From 48ab10bb0a1ae754309e0810b3d85acdf70c8225 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Tue, 5 Sep 2017 02:49:56 +0000 Subject: Create results/tempest dir for refstack config When generating refstack client reference tempest conf file, the step of tempest.conf backup is necessary. So if the dir results/tempest is absent, error shows: [Errno 2] No such file or directory: '/home/opnfv/functest/results/tempest/tempest.conf' Change-Id: I7aba5baff55a51881d125b28f99d71d0cc0a5c72 Signed-off-by: Linda Wang --- functest/opnfv_tests/openstack/tempest/conf_utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'functest/opnfv_tests/openstack/tempest/conf_utils.py') diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index 52fa6003..6c3e820f 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -130,6 +130,8 @@ def backup_tempest_config(conf_file): """ Copy config file to tempest results directory """ + if not os.path.exists(TEMPEST_RESULTS_DIR): + os.makedirs(TEMPEST_RESULTS_DIR) shutil.copyfile(conf_file, os.path.join(TEMPEST_RESULTS_DIR, 'tempest.conf')) -- cgit 1.2.3-korg