aboutsummaryrefslogtreecommitdiffstats
path: root/functest
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-12-19 14:06:27 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2016-12-19 14:06:27 +0100
commite13c1d3699ecdd77ec24cd79866629149b095fce (patch)
treec8f627e4c8d79da13b8a1c0ab5b5a71be0b4dbfb /functest
parenta94d54c49ae64b6ac74e5b8e0195414a1a2f4fff (diff)
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 <jose.lausuch@ericsson.com>
Diffstat (limited to 'functest')
-rw-r--r--functest/cli/commands/cli_testcase.py16
1 files changed, 9 insertions, 7 deletions
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)