Fix result parsing in cloudify_ims 87/58487/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 13 Jun 2018 12:56:23 +0000 (14:56 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 13 Jun 2018 12:59:36 +0000 (14:59 +0200)
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)

functest/opnfv_tests/vnf/ims/clearwater_ims_base.py

index ae01cfa..6b54d22 100644 (file)
@@ -154,8 +154,8 @@ class ClearwaterOnBoardingBase(vnf.VnfOnBoarding):
         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))