aboutsummaryrefslogtreecommitdiffstats
path: root/functest_kubernetes
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-08-14 01:04:04 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-08-17 13:45:06 +0200
commite138ceaa1e29282e6300ee83656802844533e9de (patch)
tree37e422bfcbfb29e89debfce89e2eee3272d23772 /functest_kubernetes
parentd6f86e216bd3255cb53fa7dfe8ef3a420a3027f3 (diff)
Safely decode e2e.test output
https://build.opnfv.org/ci/job/functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-arm-latest-k8s_smoke-run/2/console Change-Id: I57f3ae0051fb55c8c80de81e79168e61c06d85bb Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 64771ca4e6965c81aa2922c7efc44e4f7a38a610)
Diffstat (limited to 'functest_kubernetes')
-rw-r--r--functest_kubernetes/k8stest.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/functest_kubernetes/k8stest.py b/functest_kubernetes/k8stest.py
index 55a18233..bf19461b 100644
--- a/functest_kubernetes/k8stest.py
+++ b/functest_kubernetes/k8stest.py
@@ -59,7 +59,8 @@ class E2ETesting(testcase.TestCase):
foutput.write(boutput)
grp = re.search(
r'^(FAIL|SUCCESS)!.* ([0-9]+) Passed \| ([0-9]+) Failed \|'
- r' ([0-9]+) Pending \| ([0-9]+) Skipped', boutput.decode("utf-8"),
+ r' ([0-9]+) Pending \| ([0-9]+) Skipped',
+ boutput.decode("utf-8", errors="ignore"),
re.MULTILINE | re.DOTALL)
assert grp
self.details['passed'] = int(grp.group(2))
@@ -73,7 +74,8 @@ class E2ETesting(testcase.TestCase):
self.__logger.debug("result: %s", self.result)
if grp.group(1) == 'FAIL':
grp2 = re.search(
- r'^(Summarizing [0-9]+ Failure.*)Ran', boutput.decode("utf-8"),
+ r'^(Summarizing [0-9]+ Failure.*)Ran',
+ boutput.decode("utf-8", errors="ignore"),
re.MULTILINE | re.DOTALL)
if grp2:
self.__logger.error(grp2.group(1))