From e13c1d3699ecdd77ec24cd79866629149b095fce Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Mon, 19 Dec 2016 14:06:27 +0100 Subject: Allow executing several testcases with the CLI By naming the test cases separated by "," The CLI will call run_tests.py for each test case. This is needed for example for the 3rd party CI. Change-Id: I2fa5c68ebb292b462153853879630c0cbc5ef0a2 Signed-off-by: jose.lausuch --- functest/cli/commands/cli_testcase.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'functest/cli/commands') diff --git a/functest/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py index efe177d5..70a77a14 100644 --- a/functest/cli/commands/cli_testcase.py +++ b/functest/cli/commands/cli_testcase.py @@ -50,10 +50,12 @@ class CliTestcase: click.echo("Functest environment is not ready. " "Run first 'functest env prepare'") else: - if noclean: - cmd = ("python %s/functest/ci/run_tests.py " - "-n -t %s" % (ft_constants.FUNCTEST_REPO_DIR, testname)) - else: - cmd = ("python %s/functest/ci/run_tests.py " - "-t %s" % (ft_constants.FUNCTEST_REPO_DIR, testname)) - ft_utils.execute_command(cmd) + tests = testname.split(",") + for test in tests: + if noclean: + cmd = ("python %s/functest/ci/run_tests.py " + "-n -t %s" % (ft_constants.FUNCTEST_REPO_DIR, test)) + else: + cmd = ("python %s/functest/ci/run_tests.py " + "-t %s" % (ft_constants.FUNCTEST_REPO_DIR, test)) + ft_utils.execute_command(cmd) -- cgit 1.2.3-korg