summaryrefslogtreecommitdiffstats
path: root/cli/commands/cli_tier.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/commands/cli_tier.py')
-rw-r--r--cli/commands/cli_tier.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/cli/commands/cli_tier.py b/cli/commands/cli_tier.py
index a872eb76f..4b714c28b 100644
--- a/cli/commands/cli_tier.py
+++ b/cli/commands/cli_tier.py
@@ -7,14 +7,16 @@
# http://www.apache.org/licenses/LICENSE-2.0
#
-import click
+""" global variables """
+
import os
-import yaml
+import click
import functest.ci.tier_builder as tb
import functest.utils.functest_utils as ft_utils
+import yaml
+
-""" global variables """
with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
functest_yaml = yaml.safe_load(f)
@@ -26,6 +28,7 @@ ENV_FILE = FUNCTEST_CONF_DIR + "/env_active"
class CliTier:
+
def __init__(self):
CI_INSTALLER_TYPE = os.getenv('INSTALLER_TYPE')
CI_SCENARIO = os.getenv('DEPLOY_SCENARIO')
@@ -60,11 +63,15 @@ class CliTier:
tests = tier.get_test_names()
click.echo("Test cases in tier '%s':\n %s\n" % (tiername, tests))
- def run(self, tiername):
+ def run(self, tiername, noclean=False):
if not os.path.isfile(ENV_FILE):
click.echo("Functest environment is not ready. "
"Run first 'functest env prepare'")
else:
- cmd = ("python /home/opnfv/repos/functest/ci/run_tests.py -t %s"
- % tiername)
+ if noclean:
+ cmd = ("python /home/opnfv/repos/functest/ci/run_tests.py "
+ "-t --no-clean %s" % tiername)
+ else:
+ cmd = ("python /home/opnfv/repos/functest/ci/run_tests.py "
+ "-t %s" % tiername)
ft_utils.execute_command(cmd)