diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py index 70bd50320a0..99279110c93 100755 --- a/tools/run_tests/python_utils/jobset.py +++ b/tools/run_tests/python_utils/jobset.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) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 12c49218b05..7b4e4d6224e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -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]