Merge "Remove timestamp in the details for tempest"
authorLinda Wang <wangwulin@huawei.com>
Thu, 17 Aug 2017 07:50:21 +0000 (07:50 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 17 Aug 2017 07:50:21 +0000 (07:50 +0000)
functest/opnfv_tests/openstack/refstack_client/refstack_client.py
functest/opnfv_tests/openstack/tempest/tempest.py
functest/tests/unit/openstack/refstack_client/test_refstack_client.py

index 921d69b..86053cc 100644 (file)
@@ -107,13 +107,13 @@ class RefstackClient(testcase.OSGCTestCase):
                 num_failures = match[1]
                 LOGGER.info("".join(match))
             success_testcases = []
-            for match in re.findall(r"\{0\}(.*?)[. ]*ok", output):
+            for match in re.findall(r"\{0\} (.*?)[. ]*ok", output):
                 success_testcases.append(match)
             failed_testcases = []
-            for match in re.findall(r"\{0\}(.*?)[. ]*FAILED", output):
+            for match in re.findall(r"\{0\} (.*?)[. ]*FAILED", output):
                 failed_testcases.append(match)
             skipped_testcases = []
-            for match in re.findall(r"\{0\}(.*?)[. ]*SKIPPED:", output):
+            for match in re.findall(r"\{0\} (.*?)[. ]*SKIPPED:", output):
                 skipped_testcases.append(match)
 
             num_executed = int(num_tests) - int(num_skipped)
index 4993c74..b00bc6a 100644 (file)
@@ -196,13 +196,13 @@ class TempestCommon(testcase.OSGCTestCase):
                 output = logfile.read()
 
             success_testcases = []
-            for match in re.findall('(.*?)[. ]*success ', output):
+            for match in re.findall('.*\{0\} (.*?)[. ]*success ', output):
                 success_testcases.append(match)
             failed_testcases = []
-            for match in re.findall('(.*?)[. ]*fail ', output):
+            for match in re.findall('.*\{0\} (.*?)[. ]*fail ', output):
                 failed_testcases.append(match)
             skipped_testcases = []
-            for match in re.findall('(.*?)[. ]*skip:', output):
+            for match in re.findall('.*\{0\} (.*?)[. ]*skip:', output):
                 skipped_testcases.append(match)
 
             self.details = {"tests": int(num_tests),
index e4e3364..c560107 100644 (file)
@@ -79,9 +79,9 @@ class OSRefstackClientTesting(unittest.TestCase):
                    ''')
         self.details = {"tests": 3,
                         "failures": 1,
-                        "success": [' tempest.api.compute [18.464988s]'],
-                        "errors": [' tempest.api.volume [0.230334s]'],
-                        "skipped": [' tempest.api.network [1.265828s]']}
+                        "success": ['tempest.api.compute [18.464988s]'],
+                        "errors": ['tempest.api.volume [0.230334s]'],
+                        "skipped": ['tempest.api.network [1.265828s]']}
         with mock.patch('__builtin__.open',
                         mock.mock_open(read_data=log_file)):
             self.refstackclient.parse_refstack_result()