Skip to content

Commit

Permalink
Auto merge of #5952 - dwijnand:fix-path-deep_dependencies_trigger_reb…
Browse files Browse the repository at this point in the history
…uild, r=alexcrichton

Fix path::deep_dependencies_trigger_rebuild often failing in CI

A shallow fix for `path::deep_dependencies_trigger_rebuild` in particular as it's failed my PRs often.

See #5935 (comment), and #5940 for the bigger picture.
  • Loading branch information
bors committed Aug 30, 2018
2 parents 9ab347d + 274c162 commit e954520
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testsuite/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,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 (CWD/baz)\n\
Expand All @@ -345,7 +345,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 @@ -354,6 +353,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 (CWD/bar)\n\
Expand Down

0 comments on commit e954520

Please sign in to comment.