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

Don't rely on mtime to test changes #13143

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
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/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
Loading