aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest/tempest.py
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-08-28 08:05:29 +0000
committerLinda Wang <wangwulin@huawei.com>2017-08-28 10:15:09 +0000
commit60bc06ce24a5e6bfa6302bf1c5969e10b9e31077 (patch)
tree42c3fcca136503b9aab4be3a3bdda7f275634d17 /functest/opnfv_tests/openstack/tempest/tempest.py
parent78be021d910088aeced1b62c9d00dffa33f74ca3 (diff)
Avoid exiting when snapshot initialization failed
Change-Id: Ia8162d6c64847090d94f97fdab92cad2b5f059f1 Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/tempest.py')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index c7ad4df2..6523dfca 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -267,11 +267,14 @@ class TempestCommon(testcase.TestCase):
# Make sure that the verifier is configured
conf_utils.configure_verifier(self.DEPLOYMENT_DIR)
- os_utils.init_tempest_cleanup(
- self.DEPLOYMENT_DIR, 'tempest.conf',
- os.path.join(conf_utils.TEMPEST_RESULTS_DIR,
- "tempest-cleanup-init.log")
- )
+ try:
+ os_utils.init_tempest_cleanup(
+ self.DEPLOYMENT_DIR, 'tempest.conf',
+ os.path.join(conf_utils.TEMPEST_RESULTS_DIR,
+ "tempest-cleanup-init.log"))
+ except Exception as err:
+ logger.error(str(err))
+ return testcase.TestCase.EX_RUN_ERROR
return super(TempestCommon, self).create_snapshot()