From a6735e44ca28207d0f2c87c1f47769fed82b56fe Mon Sep 17 00:00:00 2001 From: Zalathar Date: Mon, 9 Sep 2024 14:11:43 +1000 Subject: 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`. --- src/tools/compiletest/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs index 5402e69bc66..3294a3bd080 100644 --- a/src/tools/compiletest/src/lib.rs +++ b/src/tools/compiletest/src/lib.rs @@ -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, -- cgit 1.4.1-3-g733a5