Skip to content

Change standalone wasm vm tests to emit a test skip when wasm engine is not present #24631

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

juj
Copy link
Collaborator

@juj juj commented Jun 28, 2025

Change standalone wasm vm tests to emit a test skip when wasm engine is not present, rather than print a warning and then possibly fail. Fixes test/runner core2g.test_eval_ctors_standalone without a Wasm engine present.

…is not present, rather than print a warning and then possibly fail. Fixes `test/runner core2g.test_eval_ctors_standalone` without a Wasm engine present.
@juj juj enabled auto-merge (squash) June 28, 2025 06:55
@@ -1983,7 +1983,7 @@ def _build_and_run(self, filename, expected_output, args=None,
# TODO once standalone wasm support is more stable, apply use_all_engines
# like with js engines, but for now as we bring it up, test in all of them
if not self.wasm_engines:
logger.warning('no wasm engine was found to run the standalone part of this test')
self.skipTest('no wasm engine was found to run the standalone part of this test')
Copy link
Member

Choose a reason for hiding this comment

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

It might be safer to do what we do for various features like this:

emscripten/test/common.py

Lines 1053 to 1056 in ca3d456

if 'EMTEST_SKIP_WASM64' in os.environ:
self.skipTest('test requires node >= 24 or d8 (and EMTEST_SKIP_WASM64 is set)')
else:
self.fail('either d8 or node >= 24 required to run wasm64 tests. Use EMTEST_SKIP_WASM64 to skip')

We error by default, so we can't forget to set up all the test requirements, and we allow manual opt-out instead of opt-in.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, something like EMTEST_SKIP_WASM_ENGINE probably makes the most sense.

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.

3 participants