Skip to contentSkip to conversation

dts: improve statistics

PATCH New Tomáš Ďurovec 1 participant 1 message Sep 30, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dts: improve statistics

The previous version of statistics store only the last test run attribute and result. In this patch we are adding header for each test run and overall summary of test runs at the end. This is represented as textual summaries with basic information and json result with more detailed information.

Depends-on: series-33161 ("DTS external DPDK build")

---
 dts/framework/runner.py      |   7 +-
 dts/framework/test_result.py | 409 ++++++++++++++++++++++++++++-------
 2 files changed, 332 insertions(+), 84 deletions(-)
dts/framework/runner.py +4 -3
index 7d463c1fa1..be615ccace 100644
@@ -84,7 +84,7 @@ def __init__(self):
         if not os.path.exists(SETTINGS.output_dir):
             os.makedirs(SETTINGS.output_dir)
         self._logger.add_dts_root_logger_handlers(SETTINGS.verbose, SETTINGS.output_dir)
-        self._result = DTSResult(self._logger)
+        self._result = DTSResult(SETTINGS.output_dir, self._logger)
         self._test_suite_class_prefix = "Test"
         self._test_suite_module_prefix = "tests.TestSuite_"
         self._func_test_case_regex = r"test_(?!perf_)"
@@ -421,11 +421,12 @@ def _run_test_run(
         self._logger.info(
             f"Running test run with SUT '{test_run_config.system_under_test_node.name}'."
         )
-        test_run_result.add_sut_info(sut_node.node_info)
+        test_run_result.ports = sut_node.ports
+        test_run_result.sut_info = sut_node.node_info
         try:
             dpdk_location = SETTINGS.dpdk_location or test_run_config.dpdk_config.dpdk_location
             sut_node.set_up_test_run(test_run_config, dpdk_location)
-            test_run_result.add_dpdk_build_info(sut_node.get_dpdk_build_info())
+            test_run_result.dpdk_build_info = sut_node.get_dpdk_build_info()
             tg_node.set_up_test_run(test_run_config, dpdk_location)
             test_run_result.update_setup(Result.PASS)
         except Exception as e:
dts/framework/test_result.py +328 -81

535 lines not on this page · raw message

Signature · 1 line
2.46.1