mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
dc2ffa4054
Test wasm32-wasip1 in CI, not wasm32-unknown-unknown This commit changes CI to no longer test the `wasm32-unknown-unknown` target and instead test the `wasm32-wasip1` target. There was some discussion of this in a [Zulip thread], and the motivations for this PR are: * Runtime failures on `wasm32-unknown-unknown` print nothing, meaning all you get is "something failed". In contrast `wasm32-wasip1` can print to stdout/stderr. * The unknown-unknown target is missing lots of pieces of libstd, and while `wasm32-wasip1` is also missing some pieces (e.g. threads) it's missing fewer pieces. This means that many more tests can be run. Overall my hope is to improve the debuggability of wasm failures on CI and ideally be a bit less of a maintenance burden. This commit specifically removes the testing of `wasm32-unknown-unknown` and replaces it with testing of `wasm32-wasip1`. Along the way there were a number of other archiectural changes made as well, including: * A new `target.*.runtool` option can now be specified in `config.toml` which is passed as `--runtool` to `compiletest`. This is used to reimplement execution of WebAssembly in a less-wasm-specific fashion. * The default value for `runtool` is an ambiently located WebAssembly runtime found on the system, if any. I've implemented logic for Wasmtime. * Existing testing support for `wasm32-unknown-unknown` and Emscripten has been removed. I'm not aware of Emscripten testing being run any time recently and otherwise `wasm32-wasip1` is in theory the focus now. * I've added a new `//@ needs-threads` directive for `compiletest` and classified a bunch of wasm-ignored tests as needing threads. In theory these tests can run on `wasm32-wasi-preview1-threads`, for example. * I've tried to audit all existing tests that are either `ignore-emscripten` or `ignore-wasm*`. Many now run on `wasm32-wasip1` due to being able to emit error messages, for example. Many are updated with comments as to why they can't run as well. * The `compiletest` output matching for `wasm32-wasip1` automatically uses "match a subset" mode implemented in `compiletest`. This is because WebAssembly runtimes often add extra information on failure, such as the `unreachable` instruction in `panic!`, which isn't able to be matched against the golden output from native platforms. * I've ported most existing `run-make` tests that use custom Node.js wrapper scripts to the new run-make-based-in-Rust infrastructure. To do this I added `wasmparser` as a dependency of `run-make-support` for the various wasm tests to use that parse wasm files. The one test that executed WebAssembly now uses `wasmtime`-the-CLI to execute the test instead. I have not ported over an exception-handling test as Wasmtime doesn't implement this yet. * I've updated the `test` crate to print out timing information for WASI targets as it can do that (gets a previously ignored test now passing). * The `test-various` image now builds a WASI sysroot for the WASI target and additionally downloads a fixed release of Wasmtime, currently the latest one at 18.0.2, and uses that for testing. [Zulip thread]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Have.20wasm.20tests.20ever.20caused.20problems.20on.20CI.3F/near/424317944 |
||
---|---|---|
.. | ||
abort-on-panic.rs | ||
args-panic.rs | ||
default-backtrace-ice.rs | ||
default-backtrace-ice.stderr | ||
doublepanic.rs | ||
explicit-panic-msg.rs | ||
explicit-panic.rs | ||
fmt-only-once.rs | ||
fmt-only-once.run.stderr | ||
fmt-panic.rs | ||
issue-47429-short-backtraces.legacy.run.stderr | ||
issue-47429-short-backtraces.rs | ||
issue-47429-short-backtraces.v0.run.stderr | ||
location-detail-panic-no-column.rs | ||
location-detail-panic-no-column.run.stderr | ||
location-detail-panic-no-file.rs | ||
location-detail-panic-no-file.run.stderr | ||
location-detail-panic-no-line.rs | ||
location-detail-panic-no-line.run.stderr | ||
location-detail-panic-no-location-info.rs | ||
location-detail-panic-no-location-info.run.stderr | ||
location-detail-unwrap-no-file.rs | ||
location-detail-unwrap-no-file.run.stderr | ||
main-panic.rs | ||
nested_panic_caught.rs | ||
panic-2021.rs | ||
panic-2021.stderr | ||
panic-arg.rs | ||
panic-handler-chain-update-hook.rs | ||
panic-handler-chain.rs | ||
panic-handler-flail-wildly.rs | ||
panic-handler-set-twice.rs | ||
panic-in-cleanup.rs | ||
panic-in-cleanup.run.stderr | ||
panic-in-dtor-drops-fields.rs | ||
panic-in-ffi.rs | ||
panic-in-ffi.run.stderr | ||
panic-macro-any-wrapped.rs | ||
panic-macro-any.rs | ||
panic-macro-explicit.rs | ||
panic-macro-fmt.rs | ||
panic-macro-owned.rs | ||
panic-macro-static.rs | ||
panic-main.rs | ||
panic-parens.rs | ||
panic-recover-propagate.rs | ||
panic-set-handler.rs | ||
panic-set-unset-handler.rs | ||
panic-short-backtrace-windows-x86_64.rs | ||
panic-short-backtrace-windows-x86_64.run.stderr | ||
panic-take-handler-nop.rs | ||
panic-task-name-none.rs | ||
panic-task-name-owned.rs | ||
panic.rs | ||
result-get-panic.rs | ||
runtime-switch.legacy.run.stderr | ||
runtime-switch.rs | ||
runtime-switch.v0.run.stderr | ||
short-ice-remove-middle-frames-2.rs | ||
short-ice-remove-middle-frames-2.run.stderr | ||
short-ice-remove-middle-frames.rs | ||
short-ice-remove-middle-frames.run.stderr | ||
test-panic.rs | ||
test-should-fail-bad-message.rs | ||
test-should-panic-bad-message.rs | ||
test-should-panic-no-message.rs | ||
unique-panic.rs | ||
while-body-panics.rs | ||
while-panic.rs |