mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +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 |
||
---|---|---|
.. | ||
auxiliary | ||
addassign-yield.rs | ||
async_gen_fn_iter.rs | ||
async_gen_fn.e2024.stderr | ||
async_gen_fn.none.stderr | ||
async_gen_fn.rs | ||
async-coroutine-issue-67158.rs | ||
async-coroutine-issue-67158.stderr | ||
async-gen-deduce-yield.rs | ||
async-gen-yield-ty-is-unit.rs | ||
auto-trait-regions.rs | ||
auto-trait-regions.stderr | ||
borrow-in-tail-expr.rs | ||
borrowing.rs | ||
borrowing.stderr | ||
check-resume-ty-lifetimes-2.rs | ||
check-resume-ty-lifetimes-2.stderr | ||
check-resume-ty-lifetimes.rs | ||
check-resume-ty-lifetimes.stderr | ||
clone-impl-async.rs | ||
clone-impl-async.stderr | ||
clone-impl-static.rs | ||
clone-impl-static.stderr | ||
clone-impl.rs | ||
clone-impl.stderr | ||
clone-rpit.next.stderr | ||
clone-rpit.rs | ||
conditional-drop.rs | ||
control-flow.rs | ||
coroutine-region-requirements.migrate.stderr | ||
coroutine-region-requirements.rs | ||
coroutine-region-requirements.stderr | ||
coroutine-resume-after-panic.rs | ||
coroutine-with-nll.rs | ||
coroutine-with-nll.stderr | ||
coroutine-yielding-or-returning-itself.rs | ||
coroutine-yielding-or-returning-itself.stderr | ||
derived-drop-parent-expr.rs | ||
discriminant.rs | ||
drop-and-replace.rs | ||
drop-control-flow.rs | ||
drop-env.rs | ||
drop-track-addassign-yield.rs | ||
drop-tracking-parent-expression.rs | ||
drop-tracking-parent-expression.stderr | ||
drop-tracking-yielding-in-match-guards.rs | ||
drop-yield-twice.rs | ||
drop-yield-twice.stderr | ||
dropck-resume.rs | ||
dropck-resume.stderr | ||
dropck.rs | ||
dropck.stderr | ||
gen_block_is_coro.rs | ||
gen_block_is_coro.stderr | ||
gen_block_is_iter.rs | ||
gen_block_is_no_future.rs | ||
gen_block_is_no_future.stderr | ||
gen_block_iterate.rs | ||
gen_block_move.fixed | ||
gen_block_move.rs | ||
gen_block_move.stderr | ||
gen_block_panic.rs | ||
gen_block_panic.stderr | ||
gen_block.e2024.stderr | ||
gen_block.none.stderr | ||
gen_block.rs | ||
gen_fn_iter.rs | ||
gen_fn_lifetime_capture.rs | ||
gen_fn.e2024.stderr | ||
gen_fn.none.stderr | ||
gen_fn.rs | ||
issue-44197.rs | ||
issue-45729-unsafe-in-coroutine.rs | ||
issue-45729-unsafe-in-coroutine.stderr | ||
issue-48048.rs | ||
issue-48048.stderr | ||
issue-52304.rs | ||
issue-52398.rs | ||
issue-52398.stderr | ||
issue-53548-1.rs | ||
issue-53548.rs | ||
issue-57017.rs | ||
issue-57084.rs | ||
issue-57084.stderr | ||
issue-57478.rs | ||
issue-58888.rs | ||
issue-61442-stmt-expr-with-drop.rs | ||
issue-62506-two_awaits.rs | ||
issue-64620-yield-array-element.rs | ||
issue-64620-yield-array-element.stderr | ||
issue-68112.rs | ||
issue-68112.stderr | ||
issue-69017.rs | ||
issue-69039.rs | ||
issue-87142.rs | ||
issue-88653.rs | ||
issue-88653.stderr | ||
issue-91477.rs | ||
issue-91477.stderr | ||
issue-93161.rs | ||
issue-102645.rs | ||
issue-102645.stderr | ||
issue-105084.rs | ||
issue-105084.stderr | ||
issue-110929-coroutine-conflict-error-ice.rs | ||
issue-113279.rs | ||
issue-113279.stderr | ||
iterator-count.rs | ||
layout-error.rs | ||
layout-error.stderr | ||
live-upvar-across-yield.rs | ||
match-bindings.rs | ||
match-bindings.stderr | ||
metadata-sufficient-for-layout.rs | ||
metadata-sufficient-for-layout.stderr | ||
nested_coroutine.rs | ||
niche-in-coroutine.rs | ||
non-static-is-unpin.rs | ||
not-send-sync.rs | ||
not-send-sync.stderr | ||
overlap-locals.rs | ||
panic-drops-resume.rs | ||
panic-drops.rs | ||
panic-safe.rs | ||
parent-expression.rs | ||
parent-expression.stderr | ||
partial-drop.rs | ||
partial-initialization-across-yield.rs | ||
partial-initialization-across-yield.stderr | ||
pattern-borrow.rs | ||
pattern-borrow.stderr | ||
pin-box-coroutine.rs | ||
polymorphize-args.rs | ||
reborrow-mut-upvar.rs | ||
reborrow-mut-upvar.stderr | ||
ref-escapes-but-not-over-yield.rs | ||
ref-escapes-but-not-over-yield.stderr | ||
ref-upvar-not-send.rs | ||
ref-upvar-not-send.stderr | ||
reinit-in-match-guard.rs | ||
resume-after-return.rs | ||
resume-arg-late-bound.rs | ||
resume-arg-late-bound.stderr | ||
resume-arg-size.rs | ||
resume-live-across-yield.rs | ||
retain-resume-ref.rs | ||
retain-resume-ref.stderr | ||
return-types-diverge.rs | ||
return-types.rs | ||
return-types.stderr | ||
self_referential_gen_block.rs | ||
self_referential_gen_block.stderr | ||
size-moved-locals.rs | ||
sized-yield.rs | ||
sized-yield.stderr | ||
smoke-resume-args.rs | ||
smoke.rs | ||
static-coroutine.rs | ||
static-mut-reference-across-yield.rs | ||
static-not-unpin.current.stderr | ||
static-not-unpin.next.stderr | ||
static-not-unpin.rs | ||
static-reference-across-yield.rs | ||
too-live-local-in-immovable-gen.rs | ||
too-live-local-in-immovable-gen.stderr | ||
too-many-parameters.rs | ||
too-many-parameters.stderr | ||
type-mismatch-error.rs | ||
type-mismatch-error.stderr | ||
type-mismatch-signature-deduction.rs | ||
type-mismatch-signature-deduction.stderr | ||
uninhabited-field.rs | ||
unresolved-ct-var.rs | ||
unresolved-ct-var.stderr | ||
unsized-capture-across-yield.rs | ||
unsized-capture-across-yield.stderr | ||
unsized-local-across-yield.rs | ||
unsized-local-across-yield.stderr | ||
unwind-abort-mix.rs | ||
witness-ignore-fake-reads.rs | ||
xcrate-reachable.rs | ||
xcrate.rs | ||
yield-in-args-rev.rs | ||
yield-in-args-rev.stderr | ||
yield-in-args.rs | ||
yield-in-args.stderr | ||
yield-in-const.rs | ||
yield-in-const.stderr | ||
yield-in-function.rs | ||
yield-in-function.stderr | ||
yield-in-initializer.rs | ||
yield-in-initializer.stderr | ||
yield-in-static.rs | ||
yield-in-static.stderr | ||
yield-outside-coroutine-issue-78653.rs | ||
yield-outside-coroutine-issue-78653.stderr | ||
yield-subtype.rs | ||
yield-subtype.stderr | ||
yield-while-iterating.rs | ||
yield-while-iterating.stderr | ||
yield-while-local-borrowed.rs | ||
yield-while-local-borrowed.stderr | ||
yield-while-ref-reborrowed.rs | ||
yield-while-ref-reborrowed.stderr | ||
yielding-in-match-guards.rs |