mbox

[RFC,v2,00/10] dts: add hello world testcase

Message ID 20221114165438.1133783-1-juraj.linkes@pantheon.tech (mailing list archive)
Headers

Message

Juraj Linkeš Nov. 14, 2022, 4:54 p.m. UTC
  Add code needed to run the HelloWorld testcase which just runs the hello
world dpdk application.

The patch first outlines the basic class architecture, covering Nodes
(hosts that DTS connects to), RemoteSession, OS-specific code, test
runner and Exceptions.

The patchset currently heavily refactors this original DTS code needed
to run the testcase:
* DPDK build on the System under Test
* DPDK eal args construction, app running and shutting down
* SUT hugepage memory configuration
* Test runner

The code that still needs to be refactored:
* Test results
* TestCase/TestSuite class
* Test runner parts interfacing with TestCase
* The HelloWorld testsuite itself

The code is divided into sub-packages, some of which are divided
further. It's possible that some sub-directories should be flattened to
simplify imports. I've also had to make some concessions to code
structure to avoid circular imports. I'll continue thinking about this
going forward and v3 may have a different dir/import structure.

The code has been ported from DTS and we may want/need to change some
designs, such as what configuration to do and when - for example, we may
not want DTS to configure hugepages (as that may be too much of a system
modification or it just simply makes sense to configure once outside of
DTS and not touch it in every single run).

Juraj Linkeš (10):
  dts: add node and os abstractions
  dts: add ssh command verification
  dts: add dpdk build on sut
  dts: add dpdk execution handling
  dts: add node memory setup
  dts: add test results module
  dts: add simple stats report
  dts: add testsuite class
  dts: add hello world testplan
  dts: add hello world testsuite

 dts/conf.yaml                                 |  16 +-
 dts/framework/config/__init__.py              | 186 +++++++++-
 dts/framework/config/conf_yaml_schema.json    | 137 +++++++-
 dts/framework/dts.py                          | 153 ++++++--
 dts/framework/exception.py                    | 190 +++++++++-
 dts/framework/remote_session/__init__.py      |  23 +-
 dts/framework/remote_session/arch/__init__.py |  20 ++
 dts/framework/remote_session/arch/arch.py     |  57 +++
 dts/framework/remote_session/factory.py       |  14 +
 dts/framework/remote_session/os/__init__.py   |  17 +
 .../remote_session/os/linux_session.py        | 111 ++++++
 dts/framework/remote_session/os/os_session.py | 170 +++++++++
 .../remote_session/os/posix_session.py        | 220 ++++++++++++
 .../remote_session/remote_session.py          |  94 ++++-
 dts/framework/remote_session/ssh_session.py   |  69 +++-
 dts/framework/settings.py                     |  65 +++-
 dts/framework/stats_reporter.py               |  65 ++++
 dts/framework/test_case.py                    | 246 +++++++++++++
 dts/framework/test_result.py                  | 217 ++++++++++++
 dts/framework/testbed_model/__init__.py       |   7 +-
 dts/framework/testbed_model/hw/__init__.py    |  17 +
 dts/framework/testbed_model/hw/cpu.py         | 164 +++++++++
 dts/framework/testbed_model/node.py           |  62 ----
 dts/framework/testbed_model/node/__init__.py  |   7 +
 dts/framework/testbed_model/node/node.py      | 169 +++++++++
 dts/framework/testbed_model/node/sut_node.py  | 331 ++++++++++++++++++
 dts/framework/utils.py                        |  35 ++
 dts/test_plans/hello_world_test_plan.rst      |  68 ++++
 dts/tests/TestSuite_hello_world.py            |  53 +++
 29 files changed, 2854 insertions(+), 129 deletions(-)
 create mode 100644 dts/framework/remote_session/arch/__init__.py
 create mode 100644 dts/framework/remote_session/arch/arch.py
 create mode 100644 dts/framework/remote_session/factory.py
 create mode 100644 dts/framework/remote_session/os/__init__.py
 create mode 100644 dts/framework/remote_session/os/linux_session.py
 create mode 100644 dts/framework/remote_session/os/os_session.py
 create mode 100644 dts/framework/remote_session/os/posix_session.py
 create mode 100644 dts/framework/stats_reporter.py
 create mode 100644 dts/framework/test_case.py
 create mode 100644 dts/framework/test_result.py
 create mode 100644 dts/framework/testbed_model/hw/__init__.py
 create mode 100644 dts/framework/testbed_model/hw/cpu.py
 delete mode 100644 dts/framework/testbed_model/node.py
 create mode 100644 dts/framework/testbed_model/node/__init__.py
 create mode 100644 dts/framework/testbed_model/node/node.py
 create mode 100644 dts/framework/testbed_model/node/sut_node.py
 create mode 100644 dts/test_plans/hello_world_test_plan.rst
 create mode 100644 dts/tests/TestSuite_hello_world.py