Bugfix: multisite test case fails 19/27919/1
authorJuha Kosonen <juha.kosonen@nokia.com>
Thu, 2 Feb 2017 15:27:34 +0000 (17:27 +0200)
committerJuha Kosonen <juha.kosonen@nokia.com>
Thu, 2 Feb 2017 15:27:34 +0000 (17:27 +0200)
Ensure the target directory for tempest config file exists.

JIRA: FUNCTEST-715

Change-Id: I7bfaab1faa3e664d84813cdbf9a830b0b56a1f60
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
functest/opnfv_tests/openstack/tempest/conf_utils.py

index 4c5e866..0c9064a 100644 (file)
@@ -172,6 +172,9 @@ def configure_tempest(deployment_dir, IMAGE_ID=None, FLAVOR_ID=None):
         config.write(config_file)
 
     # Copy tempest.conf to /home/opnfv/functest/results/tempest/
+    if not os.path.exists(TEMPEST_RESULTS_DIR):
+        os.makedirs(TEMPEST_RESULTS_DIR)
+
     shutil.copyfile(tempest_conf_file,
                     os.path.join(TEMPEST_RESULTS_DIR, 'tempest.conf'))