mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Fix path::deep_dependencies_trigger_rebuild often failing in CI
This commit is contained in:
parent
1f4910060f
commit
274c162b2a
@ -343,11 +343,11 @@ fn deep_dependencies_trigger_rebuild() {
|
|||||||
//
|
//
|
||||||
// We base recompilation off mtime, so sleep for at least a second to ensure
|
// We base recompilation off mtime, so sleep for at least a second to ensure
|
||||||
// that this write will change the mtime.
|
// that this write will change the mtime.
|
||||||
sleep_ms(1000);
|
|
||||||
File::create(&p.root().join("baz/src/baz.rs"))
|
File::create(&p.root().join("baz/src/baz.rs"))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.write_all(br#"pub fn baz() { println!("hello!"); }"#)
|
.write_all(br#"pub fn baz() { println!("hello!"); }"#)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
sleep_ms(1000);
|
||||||
p.cargo("build")
|
p.cargo("build")
|
||||||
.with_stderr(&format!(
|
.with_stderr(&format!(
|
||||||
"[COMPILING] baz v0.5.0 ({}/baz)\n\
|
"[COMPILING] baz v0.5.0 ({}/baz)\n\
|
||||||
@ -361,7 +361,6 @@ fn deep_dependencies_trigger_rebuild() {
|
|||||||
)).run();
|
)).run();
|
||||||
|
|
||||||
// Make sure an update to bar doesn't trigger baz
|
// Make sure an update to bar doesn't trigger baz
|
||||||
sleep_ms(1000);
|
|
||||||
File::create(&p.root().join("bar/src/bar.rs"))
|
File::create(&p.root().join("bar/src/bar.rs"))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.write_all(
|
.write_all(
|
||||||
@ -370,6 +369,7 @@ fn deep_dependencies_trigger_rebuild() {
|
|||||||
pub fn bar() { println!("hello!"); baz::baz(); }
|
pub fn bar() { println!("hello!"); baz::baz(); }
|
||||||
"#,
|
"#,
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
sleep_ms(1000);
|
||||||
p.cargo("build")
|
p.cargo("build")
|
||||||
.with_stderr(&format!(
|
.with_stderr(&format!(
|
||||||
"[COMPILING] bar v0.5.0 ({}/bar)\n\
|
"[COMPILING] bar v0.5.0 ({}/bar)\n\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user