Skip to content

Commit b85df77

Browse files
authored
Unrolled build for rust-lang#120083
Rollup merge of rust-lang#120083 - Zalathar:no-profiler, r=wesleywiser Warn when not having a profiler runtime means that coverage tests won't be run/blessed On a few occasions (e.g. rust-lang#118036, rust-lang#119984) people have been tripped up by the fact that half of the coverage test suite is skipped by default, because it `// needs-profiler-support` and the profiler runtime is not actually built in any of the default config profiles. (This is made worse by the fact that it isn't enabled in any of the PR CI jobs either. So people think that they've successfully blessed the test suite, and then get a rude surprise when their merge only fails in the full CI job suite.) This PR adds a simple warning to compiletest that should alert the user in some cases. It's not foolproof, but it should increase the chances of catching this problem earlier in the PR process.
2 parents 92d7277 + 0373ce6 commit b85df77

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/tools/compiletest/src/main.rs

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ fn main() {
1515
eprintln!("warning: `tidy` is not installed; diffs will not be generated");
1616
}
1717

18+
if !config.profiler_support && config.mode == Mode::CoverageRun {
19+
let actioned = if config.bless { "blessed" } else { "checked" };
20+
eprintln!(
21+
r#"
22+
WARNING: profiler runtime is not available, so `.coverage` files won't be {actioned}
23+
help: try setting `profiler = true` in the `[build]` section of `config.toml`"#
24+
);
25+
}
26+
1827
log_config(&config);
1928
run_tests(config);
2029
}

0 commit comments

Comments
 (0)