diff options
author | Helen Yao <yaohelan@huawei.com> | 2016-12-28 09:16:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-12-28 09:16:36 +0000 |
commit | 254a7e643bccd48bf562f8362745783dfb9542b4 (patch) | |
tree | c333dc67cbdaa199ba932555cc16b91ef3a6fb50 /functest/cli/commands/cli_testcase.py | |
parent | 598b77988aa6ba2004c8b99b8fe09dbf09e560fa (diff) | |
parent | daa4407e8a40e7eb2083335bb394d7200d4ea576 (diff) |
Merge "Add a flag in the CLI to report results to DB"
Diffstat (limited to 'functest/cli/commands/cli_testcase.py')
-rw-r--r-- | functest/cli/commands/cli_testcase.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/functest/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py index d019632a..b6566245 100644 --- a/functest/cli/commands/cli_testcase.py +++ b/functest/cli/commands/cli_testcase.py @@ -42,7 +42,14 @@ class CliTestcase: click.echo(description) @staticmethod - def run(testname, noclean=False): + def run(testname, noclean=False, report=False): + + flags = "" + if noclean: + flags += "-n " + if report: + flags += "-r " + if testname == 'vacation': vacation.main() elif not os.path.isfile(CONST.env_active): @@ -51,10 +58,6 @@ class CliTestcase: else: tests = testname.split(",") for test in tests: - if noclean: - cmd = ("python %s/functest/ci/run_tests.py " - "-n -t %s" % (CONST.dir_repo_functest, test)) - else: - cmd = ("python %s/functest/ci/run_tests.py " - "-t %s" % (CONST.dir_repo_functest, test)) + cmd = ("python %s/functest/ci/run_tests.py " + "%s -t %s" % (CONST.dir_repo_functest, flags, test)) ft_utils.execute_command(cmd) |