Commit 718cc91d by Roman Lebedev Committed by Dominic Hamon

[Tools] Fix a few python3-compatibility issues (#585)

parent e8ddd907
......@@ -138,6 +138,9 @@ def main():
# Parse the command line flags
parser = create_parser()
args, unknown_args = parser.parse_known_args()
if args.mode is None:
parser.print_help()
exit(1)
assert not unknown_args
benchmark_options = args.benchmark_options
......@@ -175,6 +178,7 @@ def main():
else:
# should never happen
print("Unrecognized mode of operation: '%s'" % args.mode)
parser.print_help()
exit(1)
check_inputs(test_baseline, test_contender, benchmark_options)
......@@ -218,8 +222,8 @@ class TestParser(unittest.TestCase):
os.path.realpath(__file__)),
'gbench',
'Inputs')
self.testInput0 = os.path.join(testInputs, 'test_baseline_run1.json')
self.testInput1 = os.path.join(testInputs, 'test_baseline_run2.json')
self.testInput0 = os.path.join(testInputs, 'test1_run1.json')
self.testInput1 = os.path.join(testInputs, 'test1_run2.json')
def test_benchmarks_basic(self):
parsed = self.parser.parse_args(
......
......@@ -191,7 +191,7 @@ class TestReportDifferenceBetweenFamilies(unittest.TestCase):
json2 = filter_benchmark(json, "BM_O.e", ".")
output_lines_with_header = generate_difference_report(json1, json2, use_color=False)
output_lines = output_lines_with_header[2:]
print "\n"
print("\n")
print("\n".join(output_lines_with_header))
self.assertEqual(len(output_lines), len(expect_lines))
for i in range(0, len(output_lines)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment