Skip to content

Commit b2d5805

Browse files
authored
Fix benchmark suite: Emit results by default (#25967)
We need to force-enable verbose mode to get the results printed. Fixes #25944
1 parent c6a3342 commit b2d5805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/runner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,11 @@ def load_test_suites(args, modules, options):
376376
except AttributeError:
377377
pass
378378
if names_in_module:
379+
# Ensure verbose output for the benchmark suite, as otherwise no benchmark
380+
# results are emitted.
381+
if m.__name__ == 'test_benchmark':
382+
options.verbose = max(options.verbose, 1)
383+
379384
loaded_tests = loader.loadTestsFromNames(sorted(names_in_module), m)
380385
tests = flattened_tests(loaded_tests)
381386
suite = suite_for_module(m, tests, options)

0 commit comments

Comments
 (0)