From 8e3302716edcbc9a19c100300543532767130796 Mon Sep 17 00:00:00 2001 From: Diogo Costa Date: Mon, 29 Jan 2024 11:10:51 +0000 Subject: [PATCH] fix(parse): update tests and suites lists parsing Signed-off-by: Diogo Costa --- framework/test_framework.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/framework/test_framework.py b/framework/test_framework.py index c1f09de..c502dfc 100644 --- a/framework/test_framework.py +++ b/framework/test_framework.py @@ -198,16 +198,23 @@ def deploy_test(platform): list_suites = test_config['suites'].split() list_tests = test_config['tests'].split() BUILD_CMD += " --argstr platform " + test_config['platform'] + if len(list_suites): BUILD_CMD += " --argstr list_suites \"" - for suit in list_suites: - BUILD_CMD += suit + " " - BUILD_CMD = BUILD_CMD[:-1] + "\"" + for index, suit in enumerate(list_suites): + BUILD_CMD += suit + if index < len(list_suites) - 1: + BUILD_CMD += r"\ " + BUILD_CMD += "\"" + if len(list_tests): BUILD_CMD += " --argstr list_tests \"" - for suit in list_tests: - BUILD_CMD += suit + " " - BUILD_CMD = BUILD_CMD[:-1] + "\"" + for index, suit in list_tests: + BUILD_CMD += suit + if index < len(list_tests) - 1: + BUILD_CMD += r"\ " + BUILD_CMD += "\"" + print(BUILD_CMD) res = os.system(BUILD_CMD)