Skip to content

Commit

Permalink
Don't rely on mtime to test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Dec 8, 2023
1 parent 232f913 commit 4ef503f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3471,7 +3471,7 @@ fn rebuild_only_on_explicit_paths() {

// random other files do not affect freshness
println!("run baz");
p.change_file("baz", "");
p.change_file("baz", "// modified");
p.cargo("build -v")
.with_stderr(
"\
Expand All @@ -3483,7 +3483,7 @@ fn rebuild_only_on_explicit_paths() {

// but changing dependent files does
println!("run foo change");
p.change_file("foo", "");
p.change_file("foo", "// modified");
p.cargo("build -v")
.with_stderr(
"\
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/build_script_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn rerun_if_env_or_file_changes() {
.with_stderr("[FINISHED] [..]")
.run();
sleep_ms(1000);
p.change_file("foo", "");
p.change_file("foo", "// modified");
p.cargo("check")
.env("FOO", "bar")
.with_stderr(
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/freshness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ fn bust_patched_dep() {
sleep_ms(1000);
}

p.change_file("reg1new/src/lib.rs", "");
p.change_file("reg1new/src/lib.rs", "// modified");
if is_coarse_mtime() {
sleep_ms(1000);
}
Expand Down

0 comments on commit 4ef503f

Please sign in to comment.