You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit implements a new heavy handed strategy in the test suite to avoid
spurious test failures and improve consistency across platforms. Instead of
letting mtimes naturally work as they normally do through out tests we force all
executions of `cargo` in the tests to, just before `cargo` is run`,
deterministically set all mtime values. This way all executions of `cargo`
should see the same mtime and hopefully not be susceptible to drift here and
there.
Additionally tests now have the ability to say that a file needs to be created
(to test mtimes and such). This will whitelist the file as having a new mtime
which is known to be a large amount of time in the future (to avoid bugs with
fast or slow tests). This way we also know exactly that we can bust caches in
tests.
Finally, Cargo was outfitted with a new change. Whenever Cargo is tracking mtime
data it will latch onto the newest mtime (even if it's in the future) for the
output. This is meant to handle two cases:
* For tests which have files in the far future it allows subsequent rebuilds to
work correctly, otherwise since a test never takes hours it looks like there's
always a file modified in the future.
* When a file is edited during a build this should ensure that the mtime
recorded for the build is the mtime *before* the build starts rather than
after the build finishes, ensuring that we correctly schedule builds for
edited files.
Closes#5940
0 commit comments