Skip to content

test_benchmark.py: Replace DEFAULT_ARG with BENCHMARK_MODE#27294

Open
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:benchmark_mode
Open

test_benchmark.py: Replace DEFAULT_ARG with BENCHMARK_MODE#27294
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:benchmark_mode

Conversation

@sbc100

@sbc100 sbc100 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

This was already acting like a global mode for the benchmark runner, it wasn't really something that an individual test could ever override.

This was already acting like a global mode for the benchmark
runner, it wasn't really something that an individual test could
ever override.
Comment thread test/test_benchmark.py
if expected_output is not None and expected_output not in output:
raise ValueError('Incorrect benchmark output:\n' + output)

if not output_parser or args == ['0']: # if arg is 0, we are not running code, and have no output to parse

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that checking for args == ['0'] wasn't as precise here since benchmarks like lua were passing their own args, which meant the mode was sometimes passed as the second argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant