diff --git a/src/imgtests/exec/loaders/kirk.py b/src/imgtests/exec/loaders/kirk.py index 13aca0eb..953fcf3d 100644 --- a/src/imgtests/exec/loaders/kirk.py +++ b/src/imgtests/exec/loaders/kirk.py @@ -20,6 +20,7 @@ logger = logging.getLogger(__name__) DEFAULT_LTP_RESULTS_DIR = Path("/var/tmp/ltp-results") # noqa: S108 +TEST_SKIPPED_RETURN_CODE = "32" class Kirk(GenericUtil): @@ -283,10 +284,12 @@ def split_result( "duration": test.get("test", {}).get("duration", 0.0), } for test in results + if test.get("test", {}).get("retval", []) != [TEST_SKIPPED_RETURN_CODE] ] metrics = {str(i): metric for i, metric in enumerate(metrics)} summary = raw_metrics.get("stats", {}) + test_type = {"type": "general"} time = { "duration_sec": round(summary.get("runtime", 0.0), 2), } @@ -296,7 +299,7 @@ def split_result( return AdapterResult( tool="kirk", - test_type={}, + test_type=test_type, time=time, metrics=metrics, ) diff --git a/src/imgtests/reporting/html_report.py b/src/imgtests/reporting/html_report.py index 3cd9e8d6..704eda9d 100644 --- a/src/imgtests/reporting/html_report.py +++ b/src/imgtests/reporting/html_report.py @@ -97,6 +97,7 @@ class DiagramConfig(NamedTuple): TOOLS_TO_SUBSYSTEMS: dict[str, Subsystem] = { "iperf3": Subsystem.NETWORK, "fio": Subsystem.FILE, + "kirk": Subsystem.SYSTEM, } @@ -324,6 +325,8 @@ def _extract_metrics_from_experiment(self, experiment: ExperimentBase) -> list[M fixed_prefix = [tool, test_type["identifier"]] case "perf": fixed_prefix = [tool, test_type["benchmark"]] + case "kirk": + fixed_prefix = [tool, test_type["type"]] case _: fixed_prefix = [tool] diff --git a/tests/unit/imgtests/test_adapter.py b/tests/unit/imgtests/test_adapter.py index 4ca06ca3..c907cdd0 100644 --- a/tests/unit/imgtests/test_adapter.py +++ b/tests/unit/imgtests/test_adapter.py @@ -1000,7 +1000,9 @@ def test_pts_parse_metrics(raw_metrics: dict[str, Any], expected: dict[str, Any] }, { "tool": "kirk", - "test_type": {}, + "test_type": { + "type": "general", + }, "time": { "duration_sec": 2.30, },