From 0eb4efd85ca586c8a326c28bc019435ff7e84548 Mon Sep 17 00:00:00 2001 From: Thierry Date: Mon, 13 Jan 2020 08:57:15 +0100 Subject: [PATCH] python3 startswith, endswith needs bytes Convert string to bytes for startswith and endswith in valgring.py Add debian dependency Signed-off-by: Thierry --- toolchain/valgrind.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/valgrind.py b/toolchain/valgrind.py index 44af6bc2c..90a2fcc33 100755 --- a/toolchain/valgrind.py +++ b/toolchain/valgrind.py @@ -37,7 +37,7 @@ def setUp(self): dist = distro.detect() deps = ['gcc', 'make'] - if dist.name == 'Ubuntu': + if dist.name in ['Ubuntu', 'debian']: deps.extend(['g++']) # FIXME: "redhat" as the distro name for RHEL is deprecated # on Avocado versions >= 50.0. This is a temporary compatibility @@ -73,7 +73,7 @@ def get_results(self, cmd): self.sourcedir, extra_args=cmd, process_kwargs={'ignore_status': True}).stdout for line in results.splitlines(): - if line.startswith('==') and line.endswith('=='): + if line.startswith(b'==') and line.endswith(b'=='): flag = True if flag: summary += '%s\n' % line