From 4eb3fef8e5876c69dc6bac70fdc010805d5b97f2 Mon Sep 17 00:00:00 2001 From: Ruomei Yan Date: Tue, 13 Dec 2022 22:02:21 +0000 Subject: MLIA-741/2 Report test results - add version extraction function in compat.py - create Metadata, MLIAMetadata, TOSAMetadata and MetadataDisplay classes - update the reporting functions so tosa and mlia version will be displayed in output json - update unit test test_configure_and_get_tosa_advisor to mock the get_events function - update the copyright information of all changed/added files - handle exception and report to json when program crashes - write new context managers for capturing stderr and stdout - support reporting stderr to json output - support reporting model checksum and model name to json output - made changes in test_e2e.py handling {model_name} replacement in --output - add unit tests Change-Id: I6629fd1c5754378e6accd488217c83d87c7eb6f1 --- tests_e2e/test_e2e.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tests_e2e') diff --git a/tests_e2e/test_e2e.py b/tests_e2e/test_e2e.py index 26f5d29..35fd707 100644 --- a/tests_e2e/test_e2e.py +++ b/tests_e2e/test_e2e.py @@ -218,11 +218,16 @@ def get_all_commands_combinations(executions: Any) -> Generator[list[str], None, ExecutionConfiguration.from_dict(exec_info) for exec_info in executions ) - return ( - command_combination - for exec_config in exec_configs - for command_combination in exec_config.all_combinations - ) + parser = get_args_parser() + for exec_config in exec_configs: + for command_combination in exec_config.all_combinations: + for idx, param in enumerate(command_combination): + if "{model_name}" in param: + args = parser.parse_args(command_combination) + model_name = Path(args.model).stem + param = param.replace("{model_name}", model_name) + command_combination[idx] = param + yield command_combination def check_args(args: list[str], no_skip: bool) -> None: -- cgit v1.2.1