1
Fork 0

Add an explicit ignore message for "up-to-date" tests

When running tests without the `--force-rerun` flag, compiletest will
automatically skip any tests that (in its judgement) don't need to be run again
since the last time they were run.

This patch adds an explicit reason to those skipped tests, which is visible
when running with `rust.verbose-tests = true` in `config.toml`.
This commit is contained in:
Zalathar 2024-09-09 14:11:43 +10:00
parent 085744b7ad
commit a6735e44ca

View file

@ -808,8 +808,11 @@ fn make_test(
&config, cache, test_name, &test_path, src_file, revision, poisoned,
);
// Ignore tests that already run and are up to date with respect to inputs.
if !config.force_rerun {
desc.ignore |= is_up_to_date(&config, testpaths, &early_props, revision, inputs);
if !config.force_rerun
&& is_up_to_date(&config, testpaths, &early_props, revision, inputs)
{
desc.ignore = true;
desc.ignore_message = Some("up-to-date");
}
test::TestDescAndFn {
desc,