@click.option('-n', '--noclean', is_flag=True, default=False,
help='The created openstack resources by the test'
'will not be cleaned after the execution.')
-def testcase_run(testname, noclean):
- _testcase.run(testname, noclean)
+@click.option('-r', '--report', is_flag=True, default=False,
+ help='Push results to the results DataBase. Only CI Pods'
+ 'have rights to do that.')
+def testcase_run(testname, noclean, report):
+ _testcase.run(testname, noclean, report)
@tier.command('list', help="Lists the available tiers.")
@click.option('-n', '--noclean', is_flag=True, default=False,
help='The created openstack resources by the tests'
'will not be cleaned after the execution.')
-def tier_run(tiername, noclean):
- _tier.run(tiername, noclean)
+@click.option('-r', '--report', is_flag=True, default=False,
+ help='Push results to the results DataBase. Only CI Pods'
+ 'have rights to do that.')
+def tier_run(tiername, noclean, report):
+ _tier.run(tiername, noclean, report)
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):
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)
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)