Skip to content

Commit a6735e4

Browse files
committed
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`.
1 parent 085744b commit a6735e4

File tree

1 file changed

+5
-2
lines changed
  • src/tools/compiletest/src

1 file changed

+5
-2
lines changed

src/tools/compiletest/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,11 @@ fn make_test(
808808
&config, cache, test_name, &test_path, src_file, revision, poisoned,
809809
);
810810
// Ignore tests that already run and are up to date with respect to inputs.
811-
if !config.force_rerun {
812-
desc.ignore |= is_up_to_date(&config, testpaths, &early_props, revision, inputs);
811+
if !config.force_rerun
812+
&& is_up_to_date(&config, testpaths, &early_props, revision, inputs)
813+
{
814+
desc.ignore = true;
815+
desc.ignore_message = Some("up-to-date");
813816
}
814817
test::TestDescAndFn {
815818
desc,

0 commit comments

Comments
 (0)