summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-04-13 16:56:04 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-04-13 16:56:27 +0200
commita9af5ea6799aa2e173ec3db1fe18c74b8e34128c (patch)
tree56ae1fff80a77d495ab42942f215ec4a563ac494
parent321f611163780d931ad5db44fbef6b4602bdaae7 (diff)
Update regex to get verification_id
Rally changes the sentence which our testcase was unable to parse. Change-Id: I9bab3109adc37d349c6fbec73cea9052d09cedb1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py10
1 files 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()