Skip to content
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

Test a wasm target in CI #1112

Merged
merged 7 commits into from
Jul 10, 2023
Merged

Conversation

alexcrichton
Copy link
Member

This PR is intended to help address a "root cause" of #1109 where this project is being used in the context of being compiled to wasm itself but we didn't actually test that on CI. This PR addresses the issue by adding a CI target that runs all the tests in CI. Some gotchas here were:

  • Any tests that spawns a subprocess can't run in CI
  • The shrink command is disabled unconditionally in the CLI since it requires spawning a process
  • Some wasm-mutate tests had limits tweaked since the RNG behavior is different on 32-bit than on 64-bit (presumably because of usize)
  • Some platform-specific error messags in wasm-compose are scrubbed more aggressively.
  • Fuzzing-related pieces are all disabled for wasm since libfuzzer doesn't compile for wasm at this time.

Helps them be a bit more cross-platform by not asserting the precise
error message is the same across platforms.
Fuzzing doesn't compile for the wasm target and this is only required
for a doc test which doesn't run on wasm anyway.
This relies on process support which wasm/WASI don't have, so always
omit this subcommand.
This involves spawning processes which wasm can't do
The tests are currently tuned for 64-bit targets presumably due to the
pattern of the RNG which differs based on the size of `usize`. This
updates some limits and tests to pass on 32-bit, namely wasm, as well.
Keep the same limits for 64-bit targets but don't make the assertions
platform-specific.
@alexcrichton alexcrichton merged commit 2413c71 into bytecodealliance:main Jul 10, 2023
@alexcrichton alexcrichton deleted the ci-wasm branch July 10, 2023 19:53
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.

2 participants