summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xci/prepare_env.py2
-rwxr-xr-xci/run_tests.py2
-rw-r--r--cli/commands/cli_os.py2
-rwxr-xr-xtestcases/features/copper.py1
-rwxr-xr-xtestcases/features/doctor.py1
-rwxr-xr-xtestcases/features/domino.py1
-rwxr-xr-xtestcases/features/sfc/sfc.py6
-rwxr-xr-xtestcases/features/sfc/sfc_colorado1.py13
-rwxr-xr-xtestcases/vnf/vRNC/parser.py1
-rw-r--r--utils/functest_utils.py4
11 files changed, 17 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index 155eeb1de..80f567613 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
.*.sw?
.project
.pydevproject
+rally_conf.json
/docs_build/
/docs_output/
/releng/
diff --git a/ci/prepare_env.py b/ci/prepare_env.py
index 6b1babaa8..e110aa572 100755
--- a/ci/prepare_env.py
+++ b/ci/prepare_env.py
@@ -223,7 +223,7 @@ def install_rally():
logger.info("Creating Rally environment...")
cmd = "rally deployment destroy opnfv-rally"
- ft_utils.execute_command(cmd, exit_on_error=False,
+ ft_utils.execute_command(cmd,
error_msg=("Deployment %s does not exist."
% DEPLOYMENT_MAME), verbose=False)
rally_conf = os_utils.get_credentials_for_rally()
diff --git a/ci/run_tests.py b/ci/run_tests.py
index af8f51dd0..638a6edf3 100755
--- a/ci/run_tests.py
+++ b/ci/run_tests.py
@@ -108,7 +108,7 @@ def run_test(test, tier_name):
else:
cmd = ("%s%s" % (EXEC_SCRIPT, flags))
logger.debug("Executing command '%s'" % cmd)
- result = ft_utils.execute_command(cmd, exit_on_error=False)
+ result = ft_utils.execute_command(cmd)
if CLEAN_FLAG:
cleanup()
diff --git a/cli/commands/cli_os.py b/cli/commands/cli_os.py
index 4324ae44d..3748c212a 100644
--- a/cli/commands/cli_os.py
+++ b/cli/commands/cli_os.py
@@ -47,7 +47,7 @@ class CliOpenStack:
def show_credentials(self):
cmd = "env|grep OS_"
- ft_utils.execute_command(cmd, exit_on_error=False, verbose=False)
+ ft_utils.execute_command(cmd, verbose=False)
click.echo("")
def fetch_credentials(self):
diff --git a/testcases/features/copper.py b/testcases/features/copper.py
index be6744a95..ab0162626 100755
--- a/testcases/features/copper.py
+++ b/testcases/features/copper.py
@@ -43,7 +43,6 @@ def main():
log_file = RESULTS_DIR + "/copper.log"
ret_val = functest_utils.execute_command(cmd,
- exit_on_error=False,
output_file=log_file)
stop_time = time.time()
diff --git a/testcases/features/doctor.py b/testcases/features/doctor.py
index 6c26875d3..00e5c1d6b 100755
--- a/testcases/features/doctor.py
+++ b/testcases/features/doctor.py
@@ -52,7 +52,6 @@ def main():
ret = functest_utils.execute_command(cmd,
info=True,
- exit_on_error=False,
output_file=log_file)
stop_time = time.time()
diff --git a/testcases/features/domino.py b/testcases/features/domino.py
index 75351a56e..7705c07bd 100755
--- a/testcases/features/domino.py
+++ b/testcases/features/domino.py
@@ -42,7 +42,6 @@ def main():
start_time = time.time()
ret = ft_utils.execute_command(cmd,
- exit_on_error=False,
output_file=log_file)
stop_time = time.time()
diff --git a/testcases/features/sfc/sfc.py b/testcases/features/sfc/sfc.py
index c701bd0f3..72b4e00cb 100755
--- a/testcases/features/sfc/sfc.py
+++ b/testcases/features/sfc/sfc.py
@@ -174,7 +174,8 @@ def main():
instance = os_utils.create_instance_and_wait_for_active(FLAVOR,
image_id,
network_id,
- INSTANCE_NAME)
+ INSTANCE_NAME,
+ av_zone='nova')
if instance is None:
logger.error("Error while booting instance.")
@@ -214,7 +215,8 @@ def main():
instance_2 = os_utils.create_instance_and_wait_for_active(FLAVOR,
image_id,
network_id,
- INSTANCE_NAME_2)
+ INSTANCE_NAME_2,
+ av_zone='nova')
if instance_2 is None:
logger.error("Error while booting instance.")
diff --git a/testcases/features/sfc/sfc_colorado1.py b/testcases/features/sfc/sfc_colorado1.py
index 2e8d81611..ef3a489cf 100755
--- a/testcases/features/sfc/sfc_colorado1.py
+++ b/testcases/features/sfc/sfc_colorado1.py
@@ -172,10 +172,12 @@ def main():
logger.debug(
"Configuration:\n name=%s \n flavor=%s \n image=%s \n "
"network=%s \n" % (INSTANCE_NAME, FLAVOR, image_id, network_id))
- instance = os_utils.create_instance_and_wait_for_active(FLAVOR,
- image_id,
- network_id,
- INSTANCE_NAME)
+ instance = os_utils.create_instance_and_wait_for_active(
+ FLAVOR,
+ image_id,
+ network_id,
+ INSTANCE_NAME,
+ av_zone='nova')
if instance is None:
logger.error("Error while booting instance.")
@@ -221,7 +223,8 @@ def main():
FLAVOR,
image_id,
network_id,
- INSTANCE_NAME_2)
+ INSTANCE_NAME_2,
+ av_zone='nova')
if instance_2 is None:
logger.error("Error while booting instance.")
diff --git a/testcases/vnf/vRNC/parser.py b/testcases/vnf/vRNC/parser.py
index 0320b104d..0381fd648 100755
--- a/testcases/vnf/vRNC/parser.py
+++ b/testcases/vnf/vRNC/parser.py
@@ -44,7 +44,6 @@ def main():
log_file = RESULTS_DIR + "/parser.log"
ret = functest_utils.execute_command(cmd,
info=True,
- exit_on_error=False,
output_file=log_file)
stop_time = time.time()
diff --git a/utils/functest_utils.py b/utils/functest_utils.py
index 717e4b2ce..ef865bedf 100644
--- a/utils/functest_utils.py
+++ b/utils/functest_utils.py
@@ -289,7 +289,7 @@ def get_ci_envvars():
return ci_env_var
-def execute_command(cmd, exit_on_error=True, info=False, error_msg="",
+def execute_command(cmd, info=False, error_msg="",
verbose=True, output_file=None):
if not error_msg:
error_msg = ("The command '%s' failed." % cmd)
@@ -317,8 +317,6 @@ def execute_command(cmd, exit_on_error=True, info=False, error_msg="",
if returncode != 0:
if verbose:
logger.error(error_msg)
- if exit_on_error:
- sys.exit(1)
return returncode