aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/VIM/OpenStack
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-01-30 00:46:21 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2016-01-30 00:47:34 +0100
commitaa02e0de645a6af39baed4abed3667a112b09c42 (patch)
treece65e69e98084c435da0865bd2ad8baee87740e6 /testcases/VIM/OpenStack
parentcc938271c9909c1aca5a80773881f0d4f35e50cd (diff)
Copy tempest.conf to results dir to be uploaded to artifacts
Change-Id: I9cfe566c085dc45410a03650a9cf2a84de004d19 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/VIM/OpenStack')
-rw-r--r--testcases/VIM/OpenStack/CI/libraries/run_tempest.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
index 50dd2521..3b937e92 100644
--- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
@@ -174,8 +174,8 @@ def configure_tempest():
logger.debug("Finding tempest.conf file...")
tempest_conf_file = RALLY_INSTALLATION_DIR+"/tempest/for-deployment-" \
+deployment_uuid+"/tempest.conf"
- if tempest_conf_file == "":
- logger.debug(" Tempest configuration file NOT found")
+ if not os.path.isfile(tempest_conf_file):
+ logger.error(" Tempest configuration file %s NOT found." % tempest_conf_file)
return False
logger.debug(" Updating fixed_network_name...")
@@ -202,6 +202,8 @@ def configure_tempest():
+USER_PASSWORD
functest_utils.execute_command(cmd,logger)
+ # Copy tempest.conf to /home/opnfv/functest/results/tempest/
+ print shutil.copyfile(tempest_conf_file,TEMPEST_RESULTS_DIR+'/tempest.conf')
return True
@@ -219,8 +221,6 @@ def run_tempest(OPTION):
if CI_DEBUG == "true" or CI_DEBUG == "True":
subprocess.call(cmd_line, shell=True, stderr=subprocess.STDOUT)
else:
- if not os.path.exists(TEMPEST_RESULTS_DIR):
- os.makedirs(TEMPEST_RESULTS_DIR)
header = "Tempest environment:\n"\
" Installer: %s\n Scenario: %s\n Node: %s\n Date: %s\n" % \
(os.getenv('INSTALLER_TYPE','Unknown'), \
@@ -284,6 +284,9 @@ def main():
else:
MODE = "--set "+args.mode
+ if not os.path.exists(TEMPEST_RESULTS_DIR):
+ os.makedirs(TEMPEST_RESULTS_DIR)
+
create_tempest_resources()
configure_tempest()
run_tempest(MODE)