Merge pull request #24861 from dapeng-mi/master

Bug fix: decode bytes object to string for subprocess.check_output ou…
pull/25179/head
Jan Tattermusch 4 years ago committed by GitHub
commit d446ec036f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tools/run_tests/python_utils/jobset.py
  2. 4
      tools/run_tests/run_tests.py

@ -212,6 +212,9 @@ class JobSpec(object):
def __cmp__(self, other):
return self.identity() == other.identity()
def __lt__(self, other):
return self.identity() < other.identity()
def __repr__(self):
return 'JobSpec(shortname=%s, cmdline=%s)' % (self.shortname,
self.cmdline)

@ -355,7 +355,7 @@ class CLanguage(object):
tests = subprocess.check_output(
[binary, '--benchmark_list_tests'],
stderr=fnull)
for line in tests.split('\n'):
for line in tests.decode().split('\n'):
test = line.strip()
if not test:
continue
@ -381,7 +381,7 @@ class CLanguage(object):
tests = subprocess.check_output(
[binary, '--gtest_list_tests'], stderr=fnull)
base = None
for line in tests.split('\n'):
for line in tests.decode().split('\n'):
i = line.find('#')
if i >= 0:
line = line[:i]

Loading…
Cancel
Save