From 03f1e6e7db202775b4631313f71b151505545ac9 Mon Sep 17 00:00:00 2001 From: Natale Patriciello Date: Tue, 27 Oct 2015 12:50:42 -0700 Subject: [PATCH] bug 2199: Python 3 fix for test.py with valgrind option --- test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test.py b/test.py index b9c465ce4..e12347dfc 100755 --- a/test.py +++ b/test.py @@ -767,6 +767,8 @@ def run_job_synchronously(shell_command, directory, valgrind, is_python, build_p elapsed_time = time.time() - start_time retval = proc.returncode + stdout_results = stdout_results.decode() + stderr_results = stderr_results.decode() # # valgrind sometimes has its own idea about what kind of memory management @@ -1324,6 +1326,8 @@ def run_tests(): else: proc = subprocess.Popen("sysctl -n hw.ncpu", shell = True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout_results, stderr_results = proc.communicate() + stdout_results = stdout_results.decode() + stderr_results = stderr_results.decode() if len(stderr_results) == 0: processors = int(stdout_results)