-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix most ui tests on emscripten target #131705
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu This PR modifies If appropriate, please update |
Nice!
No requirement that you fix them in this PR. I expect the backtrace tests may get an ignore for emscripten. It sounds like the only one of particular interest is async-await/issue-60709.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I left some suggestions. The other failing tests are fine (i.e. not needed to be addressed in this PR). I would encourage opening a tracking issue for the remaining failing ui tests on emscripten targets for tracking purposes so they aren't lost when this PR is merged.
@rustbot author |
To fix the linker errors, we need to set the output extension to `.js` instead of `.wasm`. Setting the output to a `.wasm` file puts Emscripten into standalone mode which is effectively a distinct target. We need to set the runner to be `node` as well. This fixes most of the ui tests. I fixed a few more tests with simple problems: - `intrinsics/intrinsic-alignment.rs` and `structs-enums/rec-align-u64.rs` -- Two `#[cfg]` macros match for Emscripten so we got a duplicate definition of `mod m`. - `issues/issue-12699.rs` -- Seems to hang so I disabled it - `process/process-sigpipe.rs` -- Not expected to work on Emscripten so I disabled it
236df30
to
1d6643c
Compare
@rustbot ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this LGTM now. I'll approve once PR CI is green.
@bors r+ rollup |
Thanks for the review @jieyouxu! |
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#129794 (uefi: Implement getcwd and chdir) - rust-lang#130568 (Make some float methods unstable `const fn`) - rust-lang#131521 (rename RcBox to RcInner for consistency) - rust-lang#131701 (Don't report `on_unimplemented` message for negative traits) - rust-lang#131705 (Fix most ui tests on emscripten target) - rust-lang#131733 (Fix uninlined_format_args in stable_mir) - rust-lang#131734 (Update `arm64e-apple-tvos` maintainer) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131705 - hoodmane:fix-emscripten-tests, r=jieyouxu Fix most ui tests on emscripten target To fix the linker errors, we need to set the output extension to `.js` instead of `.wasm`. Setting the output to a `.wasm` file puts Emscripten into standalone mode which is effectively a distinct target. We need to set the runner to be `node` as well. This fixes most of the ui tests. I fixed 4 additional tests with simple problems: - `intrinsics/intrinsic-alignment.rs` -- Two `#[cfg]` macros match for Emscripten so we got duplicate definition - `structs-enums/rec-align-u64.rs` -- same problem - `issues/issue-12699.rs` -- hangs so I disabled it - `process/process-sigpipe.rs` -- Not expected to work on Emscripten so I disabled it Resolves rust-lang#131666. There are 7 more failing tests. I'll try to investigate more and see if I can fix them or at least understand why they happen. - abi/numbers-arithmetic/return-float.rs (problem with [wasm treatment of noncanonical floats](https://webassembly.github.io/spec/core/exec/numerics.html#nan-propagation)?) - async-await/issue-60709.rs -- linker error related to memcpy. Possible Emscripten bug? - backtrace/dylib-dep.rs -- Says "Not supported" - backtrace/line-tables-only.rs -- Says "Not supported" - no_std/no-std-unwind-binary.rs -- compiler says `error: lang item required, but not found: eh_catch_typeinfo` - structs-enums/enum-rec/issue-17431-6.rs -- One of the two compiler errors is missing - test-attrs/test-passed.rs r?workingjubilee r?jieyouxu
To fix the linker errors, we need to set the output extension to
.js
instead of.wasm
. Setting the output to a.wasm
file puts Emscripten into standalone mode which is effectively a distinct target. We need to set the runner to benode
as well.This fixes most of the ui tests. I fixed 4 additional tests with simple problems:
intrinsics/intrinsic-alignment.rs
-- Two#[cfg]
macros match for Emscripten so we got duplicate definitionstructs-enums/rec-align-u64.rs
-- same problemissues/issue-12699.rs
-- hangs so I disabled itprocess/process-sigpipe.rs
-- Not expected to work on Emscripten so I disabled itResolves #131666.
There are 7 more failing tests. I'll try to investigate more and see if I can fix them or at least understand why they happen.
abi/numbers-arithmetic/return-float.rs (problem with wasm treatment of noncanonical floats?)
async-await/issue-60709.rs -- linker error related to memcpy. Possible Emscripten bug?
backtrace/dylib-dep.rs -- Says "Not supported"
backtrace/line-tables-only.rs -- Says "Not supported"
no_std/no-std-unwind-binary.rs -- compiler says
error: lang item required, but not found: eh_catch_typeinfo
structs-enums/enum-rec/issue-17431-6.rs -- One of the two compiler errors is missing
test-attrs/test-passed.rs
r?workingjubilee r?jieyouxu