From e069ed9749d0b6da198dda5aea31c2e19bc24af3 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Sat, 26 Aug 2017 04:09:10 +0000 Subject: Add log info of refstack tests into functest.log Change-Id: I9edf555ba17b491768fbe298e65c3b11b341d76e Signed-off-by: Linda Wang --- functest/opnfv_tests/openstack/refstack_client/refstack_client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py index 4f71b5f5d..d4a1f0728 100644 --- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py +++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py @@ -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() -- cgit 1.2.3-korg