Uh oh!
There was an error while loading. Please reload this page.
Fix flaky test - #81197
Conversation
rust-log-analyzer
commented
Jan 19, 2021
The job Click to see the possible cause of the failure (guessed by this bot) |
jyn514
commented
Jan 19, 2021
Oh boo, rustc isn't available on CI because the only compiler available is the one built from source, which isn't in PATH. Maybe we should just remove this test? |
Mark-Simulacrum
commented
Jan 19, 2021
A run-make test should be able to do provide the rustc path correctly. |
jyn514
commented
Jan 19, 2021
Thanks, done. I had to build rustdoc for run-make tests. |
jyn514
commented
Jan 21, 2021
@bors p=5 This is causing spurious failures. |
See rust-lang#81197 for what's going on here; this is a temporary stopgap until someone has time to review the proper fix.
jyn514
commented
Jan 21, 2021
Uh oh!
There was an error while loading. Please reload this page.
Remove flaky test See rust-lang#81197 for what's going on here; this is a temporary stopgap until someone has time to review the proper fix. r? `@ghost`
Mark-Simulacrum
left a comment
There was a problem hiding this comment.
r=me with two nits fixed
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
I would prefer to avoid this and instead move the test to fulldeps.
There was a problem hiding this comment.
That seems a shame when this doesn't actually need a stage 2 build :/ that means you have to compiler rustc twice to run the test at all. Rustdoc only takes about a minute to build even with a clean cache.
There was a problem hiding this comment.
I don't want to make this change in this PR. We can consider it separately.
There was a problem hiding this comment.
Ok, I reverted the change. I do think it would be useful though - #81223 could also use it, and that test is much more likely to fail, so building the compiler twice is painful.
Mark-Simulacrum
commented
Jan 23, 2021
r=me with commits squashed |
Rustdoc writes to a pipe, and if the program on the other side has exited, it will exit with SIGPIPE. To avoid that happening, call `rustc` instead of `true`, which will wait to exit until it sees EOF on stdin. - Use a run-make-fulldeps test so that rustc is available in CI This is not exactly right, because the test shouldn't require building rustc twice, but it avoids having to build rustdoc for run-make tests.
jyn514
commented
Jan 24, 2021
@bors r=Mark-Simulacrum rollup |
ijackson
commented
Feb 12, 2021
AIUI the program we specify here gets passed rustc flags. So we need something that:
rustc seems like the obvious answer. Maybe we are getting the stage0 rustc and we need a stage1? |
Mark-Simulacrum
commented
Feb 12, 2021
Yeah I'm afraid I don't have the time to do a deep dive into why the rustc being passed isn't found; I would recommend starting by making sure it is getting passed by printing out the command rustdoc tries to run when it fails... |
…rk-Simulacrum Build rustdoc for run-make tests, not just run-make-fulldeps Rustdoc almost never needs a full stage 2 compiler, and requiring rustdoc tests to be in run-make-fulldeps adds a lot of compile time for no reason. This is the same change from rust-lang#81197, but separated into its own PR. I ran into this again today while working on rust-lang/docs.rs#1302. r? `@Mark-Simulacrum`
…rk-Simulacrum Build rustdoc for run-make tests, not just run-make-fulldeps Rustdoc almost never needs a full stage 2 compiler, and requiring rustdoc tests to be in run-make-fulldeps adds a lot of compile time for no reason. This is the same change from rust-lang#81197, but separated into its own PR. I ran into this again today while working on rust-lang/docs.rs#1302. r? ``@Mark-Simulacrum``
…rk-Simulacrum Build rustdoc for run-make tests, not just run-make-fulldeps Rustdoc almost never needs a full stage 2 compiler, and requiring rustdoc tests to be in run-make-fulldeps adds a lot of compile time for no reason. This is the same change from rust-lang#81197, but separated into its own PR. I ran into this again today while working on rust-lang/docs.rs#1302. r? ```@Mark-Simulacrum```
JohnCSimon
commented
Mar 16, 2021
jyn514
commented
Mar 16, 2021
@JohnCSimon This fails when tested on windows: #81197 (comment) @rustbot label: +S-waiting-on-author -S-waiting-on-review |
jyn514
commented
Mar 28, 2021
I've tried to do this for about 15 minutes now and I'm really stumped - is there a way to show the output when a run-make test passes? Here's what I've tried so far: Detailsdiff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 86d940cd733..9a33d952ff1 100644
--- a/src/bootstrap/test.rs+++ b/src/bootstrap/test.rs@@ -1257,7 +1257,7 @@ fn run(self, builder: &Builder<'_>) {
cmd.arg("--verbose");
}
- if !builder.config.verbose_tests {+ if !builder.config.verbose_tests && !builder.is_verbose() {
cmd.arg("--quiet");
}
@@ -1808,7 +1808,7 @@ fn run(self, builder: &Builder<'_>) {
cargo.arg("--");
cargo.args(&builder.config.cmd.test_args());
- if !builder.config.verbose_tests {+ if !builder.config.verbose_tests && !builder.is_verbose() {
cargo.arg("--quiet");
}
@@ -1921,7 +1921,7 @@ fn run(self, builder: &Builder<'_>) {
dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target)));
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
- if !builder.config.verbose_tests {+ if !builder.config.verbose_tests && !builder.is_verbose() {
cargo.arg("--quiet");
}
@@ -1992,7 +1992,7 @@ fn run(self, builder: &Builder<'_>) {
cargo.arg("'-Ctarget-feature=-crt-static'");
}
- if !builder.config.verbose_tests {+ if !builder.config.verbose_tests && !builder.is_verbose() {
cargo.arg("--quiet");
}
|
jyn514
commented
Mar 28, 2021
Also, if there's a way to get CI to run tests for Windows instead of Linux on PR builds, that would be super helpful. |
crlf0710
commented
Apr 17, 2021
I think it's possible. Maybe just edit the CI related configurations temporarily in this PR... and revert the changes after it's ready. |
jyn514
commented
Apr 23, 2021
I'm not planning to spend any more time on this. |
Rustdoc writes to a pipe, and if the program on the other side has
exited, it will exit with SIGPIPE. To avoid that happening, call
rustcinstead of
true, which will wait to exit until it sees EOF on stdin.cc #79705 (comment), #80924 (comment)
r? @ijackson