Skip to content

Commit ed98d02

Browse files
authored
Merge b291847 into 8986839
2 parents 8986839 + b291847 commit ed98d02

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

tools/compare.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ def main():
138138
# Parse the command line flags
139139
parser = create_parser()
140140
args, unknown_args = parser.parse_known_args()
141+
if args.mode is None:
142+
parser.print_help()
143+
exit(1)
141144
assert not unknown_args
142145
benchmark_options = args.benchmark_options
143146

@@ -175,6 +178,7 @@ def main():
175178
else:
176179
# should never happen
177180
print("Unrecognized mode of operation: '%s'" % args.mode)
181+
parser.print_help()
178182
exit(1)
179183

180184
check_inputs(test_baseline, test_contender, benchmark_options)
@@ -218,8 +222,8 @@ def setUp(self):
218222
os.path.realpath(__file__)),
219223
'gbench',
220224
'Inputs')
221-
self.testInput0 = os.path.join(testInputs, 'test_baseline_run1.json')
222-
self.testInput1 = os.path.join(testInputs, 'test_baseline_run2.json')
225+
self.testInput0 = os.path.join(testInputs, 'test1_run1.json')
226+
self.testInput1 = os.path.join(testInputs, 'test1_run2.json')
223227

224228
def test_benchmarks_basic(self):
225229
parsed = self.parser.parse_args(

tools/gbench/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def test_basic(self):
191191
json2 = filter_benchmark(json, "BM_O.e", ".")
192192
output_lines_with_header = generate_difference_report(json1, json2, use_color=False)
193193
output_lines = output_lines_with_header[2:]
194-
print "\n"
194+
print("\n")
195195
print("\n".join(output_lines_with_header))
196196
self.assertEqual(len(output_lines), len(expect_lines))
197197
for i in range(0, len(output_lines)):

0 commit comments

Comments
 (0)