bugfix for finding tempest failed testcase 25/28025/2
authorMatthewLi <matthew.lijun@huawei.com>
Sat, 4 Feb 2017 07:41:35 +0000 (02:41 -0500)
committerMatthewLi <matthew.lijun@huawei.com>
Sat, 4 Feb 2017 08:46:18 +0000 (03:46 -0500)
JIRA: FUNCTEST-719
1.in new tempest version, FAILED-->fail
see log https://build.opnfv.org/ci/view/dovetail/job/dovetail-compass-virtual-debug-master/163/artifact/results/tempest/tempest.log
2.there is a need to show the skipped testcase in tempest

Change-Id: If753c59971362625ae0797a0161e07b1e4ff94c8
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
functest/opnfv_tests/openstack/tempest/tempest.py

index 9c19a14..e1a223a 100644 (file)
@@ -249,12 +249,16 @@ class TempestCommon(testcase_base.TestcaseBase):
                 output = logfile.read()
 
             error_logs = ""
-            for match in re.findall('(.*?)[. ]*FAILED', output):
+            for match in re.findall('(.*?)[. ]*fail ', output):
                 error_logs += match
+            skipped_testcase = ""
+            for match in re.findall('(.*?)[. ]*skip:', output):
+                skipped_testcase += match
 
             self.details = {"tests": int(num_tests),
                             "failures": int(num_failures),
-                            "errors": error_logs}
+                            "errors": error_logs,
+                            "skipped": skipped_testcase}
         except Exception:
             success_rate = 0