aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2017-08-10 09:23:50 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-10 09:23:50 +0000
commit7bd30cdc1e6d506bf1245daeb9d01530eab15674 (patch)
treefeddfa7a6bdb4206464e6a38b8368d44f1e58f03 /functest/opnfv_tests/openstack
parent5412952848260b4cc83d455db4681daf9e37b657 (diff)
parent2826ab5703330d2438c15c9d56c8b978d5023e09 (diff)
Merge "Record the test cases passed in tempest"
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r--functest/opnfv_tests/openstack/refstack_client/refstack_client.py12
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py16
2 files changed, 16 insertions, 12 deletions
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index 76bee19d..921d69b4 100644
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -106,15 +106,15 @@ class RefstackClient(testcase.OSGCTestCase):
for match in re.findall(r"(- Failed: )(\d+)", output):
num_failures = match[1]
LOGGER.info("".join(match))
- success_testcases = ""
+ success_testcases = []
for match in re.findall(r"\{0\}(.*?)[. ]*ok", output):
- success_testcases += match + ", "
- failed_testcases = ""
+ success_testcases.append(match)
+ failed_testcases = []
for match in re.findall(r"\{0\}(.*?)[. ]*FAILED", output):
- failed_testcases += match + ", "
- skipped_testcases = ""
+ failed_testcases.append(match)
+ skipped_testcases = []
for match in re.findall(r"\{0\}(.*?)[. ]*SKIPPED:", output):
- skipped_testcases += match + ", "
+ skipped_testcases.append(match)
num_executed = int(num_tests) - int(num_skipped)
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index e565f5f9..4993c74a 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -195,17 +195,21 @@ class TempestCommon(testcase.OSGCTestCase):
"tempest.log"), 'r') as logfile:
output = logfile.read()
- error_logs = ""
+ success_testcases = []
+ for match in re.findall('(.*?)[. ]*success ', output):
+ success_testcases.append(match)
+ failed_testcases = []
for match in re.findall('(.*?)[. ]*fail ', output):
- error_logs += match
- skipped_testcase = ""
+ failed_testcases.append(match)
+ skipped_testcases = []
for match in re.findall('(.*?)[. ]*skip:', output):
- skipped_testcase += match
+ skipped_testcases.append(match)
self.details = {"tests": int(num_tests),
"failures": int(num_failures),
- "errors": error_logs,
- "skipped": skipped_testcase}
+ "success": success_testcases,
+ "errors": failed_testcases,
+ "skipped": skipped_testcases}
except Exception:
self.result = 0