-
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 flaky test #81197
Fix flaky test #81197
Conversation
The job Click to see the possible cause of the failure (guessed by this bot)
|
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? |
A run-make test should be able to do provide the rustc path correctly. |
Thanks, done. I had to build rustdoc for run-make tests. |
@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.
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`
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.
r=me with two nits fixed
src/bootstrap/test.rs
Outdated
@@ -1003,7 +1003,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the | |||
|
|||
// Avoid depending on rustdoc when we don't need it. | |||
if mode == "rustdoc" | |||
|| (mode == "run-make" && suite.ends_with("fulldeps")) | |||
|| mode == "run-make" |
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.
I would prefer to avoid this and instead move the test to fulldeps.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to make this change in this PR. We can consider it separately.
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.
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.
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.
@bors r=Mark-Simulacrum rollup |
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? |
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 This fails when tested on windows: #81197 (comment) @rustbot label: +S-waiting-on-author -S-waiting-on-review |
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: diff --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");
}
|
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. |
I think it's possible. Maybe just edit the CI related configurations temporarily in this PR... and revert the changes after it's ready. |
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
rustc
instead of
true
, which will wait to exit until it sees EOF on stdin.cc #79705 (comment), #80924 (comment)
r? @ijackson