aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack/refstack_client/refstack_client.py')
-rw-r--r--functest/opnfv_tests/openstack/refstack_client/refstack_client.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index 4f71b5f5..17e02466 100644
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -100,6 +100,14 @@ class RefstackClient(testcase.TestCase):
try:
with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
"refstack.log"), 'r') as logfile:
+ for line in logfile.readlines():
+ if 'Tests' in line:
+ break
+ if re.search(r"\} tempest\.", line):
+ LOGGER.info(line.replace('\n', ''))
+
+ with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
+ "refstack.log"), 'r') as logfile:
output = logfile.read()
for match in re.findall(r"Ran: (\d+) tests in (\d+\.\d{4}) sec.",
@@ -216,11 +224,14 @@ class RefstackClient(testcase.TestCase):
if not self.tempestconf:
self.generate_conf()
- os_utils.init_tempest_cleanup(
- self.tempestconf.DEPLOYMENT_DIR, 'tempest.conf',
- os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
- "tempest-cleanup-init.log")
- )
+ try:
+ os_utils.init_tempest_cleanup(
+ self.tempestconf.DEPLOYMENT_DIR, 'tempest.conf',
+ os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
+ "tempest-cleanup-init.log"))
+ except Exception as err:
+ LOGGER.error(str(err))
+ return testcase.TestCase.EX_RUN_ERROR
return super(RefstackClient, self).create_snapshot()