Skip to content

ci: Start running wasm32 tests on Travis #46291

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

alexcrichton
Copy link
Member

This commit allocates a builder to running wasm32 tests on Travis. Not all test
suites pass right now so this is starting out with just the run-pass and the
libcore test suites. This'll hopefully give us a pretty broad set of coverage
for integration in rustc itself as well as a somewhat broad coverage of the llvm
backend itself through integration/unit tests.

@alexcrichton
Copy link
Member Author

This is the successor of #45905 and #46291 and will help ensure that we don't regress features in wasm over time. Notably this will ensure we don't regress rustc integration itself, the ability to create wasm executables/dylibs/etc, as well as functionality in libstd/libcore. This also relatively importantly actually puts the llvm backend to the test to ensure its correctness.

In testing this turned up a bug previously known about in LLVM but one I hadn't gotten around to fixing yet. I've now backported the fix to our LLVM fork as well as the LLVM 5 branch and it's included here to help the tests pass.

Note that some downsides of this include:

  • Yet another target which may require liberal // ignore annotations to new tests. The wasm target ignores everything that emscripten would ignore so it's maybe not too bad, but there's certainly a lot of // ignore-wasm32-bare already.
  • Debugging wasm failures is crazy hard. There's no debugger! There's no println! It's mostly a stare-and-pray game.

I think that despite these downsides though it's good to get ahead of the game and get this target testing sooner rather than later. I think these points will get better over time as more and more functionality is implemented (like debuggers or "real" imports).

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Nov 27, 2017
src/test/run-pass \
src/test/compile-fail \
src/test/parse-fail \
src/test/run-fail \
Copy link
Member

Choose a reason for hiding this comment

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

I think it's better to remove this line over opting-out in bootstrap/check.rs? There needs to be a FIXME comment next to one of the workarounds anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure yeah, I preemptively added that to get a ./x.py test --target wasm32-... working, but we can always easily add it back later.

@@ -10,6 +10,7 @@

// Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction.
// compile-flags: -Z saturating-float-casts
// ignore-wasm32-bare FIXME this should actually work, but doesn't?
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to link #46298 here

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@alexcrichton
Copy link
Member Author

Updated!

r? @kennytm

@kennytm
Copy link
Member

kennytm commented Nov 27, 2017

@bors r+ p=20

(raising priority since new tests from other PRs may not pass)

@bors
Copy link
Collaborator

bors commented Nov 27, 2017

📌 Commit e6977bb has been approved by kennytm

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2017
@bors
Copy link
Collaborator

bors commented Nov 27, 2017

⌛ Testing commit e6977bb74a1a75bc2ba405c1519f6d39093ddcd8 with merge ee17cf124e93f32e8eb27bb3180dafbcba8db0c9...

@bors
Copy link
Collaborator

bors commented Nov 27, 2017

💔 Test failed - status-travis

@steveklabnik
Copy link
Member

looks spurious?

�[0Ktravis_fold:end:after_failure.1
�[0Ktravis_fold:start:after_failure.2
�[0Ktravis_time:start:28f0a230
�[0K$ cat obj/tmp/sccache.log
WARN:sccache::cache::s3: Got AWS error: Error(BadHTTPStatus(NotFound), State { next_error: None })
WARN:sccache::cache::s3: Got AWS error: Error(BadHTTPStatus(NotFound), State { next_error: None })

travis_time:end:28f0a230:start=1511825893488996918,finish=1511825893494620866,duration=5623948
�[0Ktravis_fold:end:after_failure.2
�[0Ktravis_fold:start:after_failure.3
�[0Ktravis_time:start:093c2a7c
�[0K$ cat /tmp/sccache.log
cat: /tmp/sccache.log: No such file or directory

travis_time:end:093c2a7c:start=1511825893499958946,finish=1511825893504677327,duration=4718381
�[0Ktravis_fold:end:after_failure.3
�[0Ktravis_fold:start:after_failure.4
�[0Ktravis_time:start:024aa040
�[0K$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory

travis_time:end:024aa040:start=1511825893510452059,finish=1511825893516475163,duration=6023104
�[0Ktravis_fold:end:after_failure.4
�[0Ktravis_fold:start:after_failure.5
�[0Ktravis_time:start:04998e31
�[0K$ find $HOME/Library/Logs/DiagnosticReports -type f -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \;
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory

travis_time:end:04998e31:start=1511825893522040560,finish=1511825893528102089,duration=6061529
�[0Ktravis_fold:end:after_failure.5
�[0Ktravis_fold:start:after_failure.6
�[0Ktravis_time:start:1095a09c
�[0K$ dmesg | grep -i kill
[   17.681956] init: failsafe main process (1133) killed by TERM signal

travis_time:end:1095a09c:start=1511825893532877544,finish=1511825893540881585,duration=8004041
�[0Ktravis_fold:end:after_failure.6
�[0K

@kennytm
Copy link
Member

kennytm commented Nov 27, 2017

No, legit.

[01:39:21] failures:
[01:39:21] 
[01:39:21] ---- [mir-opt] mir-opt/packed-struct-drop-aligned.rs stdout ----
[01:39:21] 	thread '[mir-opt] mir-opt/packed-struct-drop-aligned.rs' panicked at 'Did not find expected line, error: Mismatch in lines
[01:39:21] Currnt block:     bb0: {
[01:39:21] Expected Line: "        drop(_6) -> bb2;                 // scope 1 at /checkout/src/test/mir-opt/packed-struct-drop-aligned.rs:13:5: 13:8"
[01:39:21] Actual Line: "        drop(_6) -> [return: bb4, unwind: bb3];"

@alexcrichton
Copy link
Member Author

nah I think that's a test I need to ignore, I'll do that in a bit

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 28, 2017
This commit allocates a builder to running wasm32 tests on Travis. Not all test
suites pass right now so this is starting out with just the run-pass and the
libcore test suites. This'll hopefully give us a pretty broad set of coverage
for integration in rustc itself as well as a somewhat broad coverage of the llvm
backend itself through integration/unit tests.
@alexcrichton
Copy link
Member Author

@bors: r=kennytm

@bors
Copy link
Collaborator

bors commented Nov 28, 2017

📌 Commit 73970bf has been approved by kennytm

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 28, 2017
bors added a commit that referenced this pull request Nov 28, 2017
ci: Start running wasm32 tests on Travis

This commit allocates a builder to running wasm32 tests on Travis. Not all test
suites pass right now so this is starting out with just the run-pass and the
libcore test suites. This'll hopefully give us a pretty broad set of coverage
for integration in rustc itself as well as a somewhat broad coverage of the llvm
backend itself through integration/unit tests.
@bors
Copy link
Collaborator

bors commented Nov 28, 2017

⌛ Testing commit 73970bf with merge 71340ca...

@bors
Copy link
Collaborator

bors commented Nov 28, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing 71340ca to master...

@bors bors merged commit 73970bf into rust-lang:master Nov 28, 2017
@steveklabnik
Copy link
Member

Not only am I pumped that this landed, but @alexcrichton , apparently this is the 2000th PR you've closed out! 🎊 💯 ❤️ :shipit:

alex

@alexcrichton alexcrichton deleted the wasm-tests branch November 29, 2017 00:08
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jan 3, 2019
…=alexcrichton

Rename and fix nolink-with-link-args test

There are three problems with the nolink-with-link-args test:

* The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in rust-lang#46291.
* In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](rust-lang#12826).
* Pattern has a small typo.

At first I was going to completely remove this test, but there is [a closed pull request for that](rust-lang#21090).

So:

* rename the file as suggested in the closed PR
* adjust the comment
* fix typo in the pattern
* add `ignore-msvc`.

r? @alexcrichton
kennytm added a commit to kennytm/rust that referenced this pull request Jan 5, 2019
…=alexcrichton

Rename and fix nolink-with-link-args test

There are three problems with the nolink-with-link-args test:

* The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in rust-lang#46291.
* In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](rust-lang#12826).
* Pattern has a small typo.

At first I was going to completely remove this test, but there is [a closed pull request for that](rust-lang#21090).

So:

* rename the file as suggested in the closed PR
* adjust the comment
* fix typo in the pattern
* add `ignore-msvc`.

r? @alexcrichton
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants