From a9af5ea6799aa2e173ec3db1fe18c74b8e34128c Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Fri, 13 Apr 2018 16:56:04 +0200 Subject: [PATCH] Update regex to get verification_id MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Rally changes the sentence which our testcase was unable to parse. Change-Id: I9bab3109adc37d349c6fbec73cea9052d09cedb1 Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/tempest/tempest.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 4660439d9..4e823da00 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -181,12 +181,10 @@ class TempestCommon(testcase.TestCase): for line in iter(proc.stdout.readline, b''): if re.search(r"\} tempest\.", line): LOGGER.info(line.replace('\n', '')) - elif re.search('Starting verification', line): - LOGGER.info(line.replace('\n', '')) - first_pos = line.index("UUID=") + len("UUID=") - last_pos = line.index(") for deployment") - self.verification_id = line[first_pos:last_pos] - LOGGER.debug('Verification UUID: %s', self.verification_id) + elif re.search(r'(?=\(UUID=(.*)\))', line): + self.verification_id = re.search( + r'(?=\(UUID=(.*)\))', line).group(1) + LOGGER.info('Verification UUID: %s', self.verification_id) f_stdout.write(line) proc.wait() -- 2.16.6