Skip to content
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 path::deep_dependencies_trigger_rebuild often failing in CI #5952

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/testsuite/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ fn deep_dependencies_trigger_rebuild() {
//
// We base recompilation off mtime, so sleep for at least a second to ensure
// that this write will change the mtime.
sleep_ms(1000);
File::create(&p.root().join("baz/src/baz.rs"))
.unwrap()
.write_all(br#"pub fn baz() { println!("hello!"); }"#)
.unwrap();
sleep_ms(1000);
p.cargo("build")
.with_stderr(&format!(
"[COMPILING] baz v0.5.0 ({}/baz)\n\
Expand All @@ -361,7 +361,6 @@ fn deep_dependencies_trigger_rebuild() {
)).run();

// Make sure an update to bar doesn't trigger baz
sleep_ms(1000);
File::create(&p.root().join("bar/src/bar.rs"))
.unwrap()
.write_all(
Expand All @@ -370,6 +369,7 @@ fn deep_dependencies_trigger_rebuild() {
pub fn bar() { println!("hello!"); baz::baz(); }
"#,
).unwrap();
sleep_ms(1000);
p.cargo("build")
.with_stderr(&format!(
"[COMPILING] bar v0.5.0 ({}/bar)\n\
Expand Down