aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli/commands/cli_tier.py
diff options
context:
space:
mode:
authorHelen Yao <yaohelan@huawei.com>2016-12-28 09:16:36 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-28 09:16:36 +0000
commit254a7e643bccd48bf562f8362745783dfb9542b4 (patch)
treec333dc67cbdaa199ba932555cc16b91ef3a6fb50 /functest/cli/commands/cli_tier.py
parent598b77988aa6ba2004c8b99b8fe09dbf09e560fa (diff)
parentdaa4407e8a40e7eb2083335bb394d7200d4ea576 (diff)
Merge "Add a flag in the CLI to report results to DB"
Diffstat (limited to 'functest/cli/commands/cli_tier.py')
-rw-r--r--functest/cli/commands/cli_tier.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/functest/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py
index 01208498..b9d25b6d 100644
--- a/functest/cli/commands/cli_tier.py
+++ b/functest/cli/commands/cli_tier.py
@@ -54,15 +54,18 @@ class CliTier:
click.echo("Test cases in tier '%s':\n %s\n" % (tiername, tests))
@staticmethod
- def run(tiername, noclean=False):
+ def run(tiername, noclean=False, report=False):
+
+ flags = ""
+ if noclean:
+ flags += "-n "
+ if report:
+ flags += "-r "
+
if not os.path.isfile(CONST.env_active):
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" % (CONST.dir_repo_functest, tiername))
- else:
- cmd = ("python %s/functest/ci/run_tests.py "
- "-t %s" % (CONST.dir_repo_functest, tiername))
+ cmd = ("python %s/functest/ci/run_tests.py "
+ "%s -t %s" % (CONST.dir_repo_functest, flags, tiername))
ft_utils.execute_command(cmd)