aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-08-03 08:51:37 +0000
committerLinda Wang <wangwulin@huawei.com>2017-08-09 09:05:32 +0000
commit2826ab5703330d2438c15c9d56c8b978d5023e09 (patch)
treefed502b831b9f87528766a90caf0adfc0a1b8ffa /functest/opnfv_tests/openstack/tempest
parentcd4716eb5fa3a12e256fba8faa75780b7398ff68 (diff)
Record the test cases passed in tempest
Also, convert the test cases recorded with string into list Change-Id: Ie3980a555b4042e6fe9706320d33d4ec4c06ea0c Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py16
1 files changed, 10 insertions, 6 deletions
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