The previous regex failed when errors are listed [1].
[1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-fraser/194/console
Change-Id: I57c8bfb8968555c3d43267a06f2bb9a2b95a3268
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit
da3c805f8829f67d4d4154cd24f322ccf516b450)
vims_test_result = {}
try:
grp = re.search(
- '(\d+) failures out of (\d+) tests run\n.*?'
- '(\d+) tests skipped', result)
+ r'(\d+) failures out of (\d+) tests run.*'
+ r'(\d+) tests skipped', result, re.MULTILINE | re.DOTALL)
assert grp
vims_test_result["failures"] = int(grp.group(1))
vims_test_result["total"] = int(grp.group(2))