aboutsummaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-10-15 19:31:55 +0200
committerNeale Ranns <nranns@cisco.com>2019-10-16 15:00:45 +0000
commit6ed154f779c765f38b61ed84349bd539287dd02b (patch)
tree94821fb30d58ee909528bd3fecdd5c3e1dd1461c /test/framework.py
parentd6df3acf5cf31b603241574cadbf9863e27b2d60 (diff)
tests: cli wrapper should return string
Python3 fixes. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I648b2142d45dfab9146a02eeb1b12de11103ff9f Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/framework.py b/test/framework.py
index fb1446572ee..c1bfaa7630f 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -175,14 +175,16 @@ def pump_output(testclass):
if testclass.vpp.stderr.fileno() in readable:
read = os.read(testclass.vpp.stderr.fileno(), 102400)
if len(read) > 0:
- split = read.splitlines(True)
+ split = read.decode('ascii',
+ errors='backslashreplace').splitlines(True)
if len(stderr_fragment) > 0:
split[0] = "%s%s" % (stderr_fragment, split[0])
- if len(split) > 0 and split[-1].endswith(b"\n"):
+ if len(split) > 0 and split[-1].endswith("\n"):
limit = None
else:
limit = -1
stderr_fragment = split[-1]
+
testclass.vpp_stderr_deque.extend(split[:limit])
if not testclass.cache_vpp_output:
for line in split[:limit]: