Add log info of refstack tests into functest.log
authorLinda Wang <wangwulin@huawei.com>
Sat, 26 Aug 2017 04:09:10 +0000 (04:09 +0000)
committerLinda Wang <wangwulin@huawei.com>
Sat, 26 Aug 2017 04:09:10 +0000 (04:09 +0000)
Change-Id: I9edf555ba17b491768fbe298e65c3b11b341d76e
Signed-off-by: Linda Wang <wangwulin@huawei.com>
functest/opnfv_tests/openstack/refstack_client/refstack_client.py

index 4f71b5f..d4a1f07 100644 (file)
@@ -98,6 +98,14 @@ class RefstackClient(testcase.TestCase):
     def parse_refstack_result(self):
         """Parse Refstack results."""
         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()