Skip to content

Fix benchmark suite #15566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,19 @@ def build(self, parent, filename, args, shared_args, emcc_args, native_args, nat
EMCC, filename,
OPTIMIZATIONS,
'-s', 'INITIAL_MEMORY=256MB',
'-s', 'FILESYSTEM=0',
'-s', 'ENVIRONMENT=node,shell',
'-s', 'BENCHMARK=%d' % (1 if IGNORE_COMPILATION and not has_output_parser else 0),
'-o', final
] + shared_args + emcc_args + LLVM_FEATURE_FLAGS + self.extra_args
] + shared_args + LLVM_FEATURE_FLAGS
if common.EMTEST_FORCE64:
cmd += ['--profiling']
else:
cmd += ['--closure=1', '-sMINIMAL_RUNTIME']
if 'FORCE_FILESYSTEM' in cmd:
cmd = [arg if arg != 'FILESYSTEM=0' else 'FILESYSTEM=1' for arg in cmd]
# add additional emcc args at the end, which may override other things
# above, such as minimal runtime
cmd += emcc_args + self.extra_args
if 'FORCE_FILESYSTEM' not in cmd:
cmd += ['-s', 'FILESYSTEM=0']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why explicitly disable the filesystem here? (i.e. why not let emcc decide it filesystem is needed or not?)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the reasoning for this moved code is that most benchmarks don't use files, and power users will be disabling the filesystem entirely which can save a few more bytes in some cases.

if PROFILING:
cmd += ['--profiling-funcs']
self.cmd = cmd
Expand Down