File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -1111,3 +1111,18 @@ fn check_for_overlapping_test_paths(found_path_stems: &HashSet<Utf8PathBuf>) {
11111111 ) ;
11121112 }
11131113}
1114+
1115+ pub fn early_config_check ( config : & Config ) {
1116+ if !config. has_html_tidy && config. mode == Mode :: Rustdoc {
1117+ eprintln ! ( "warning: `tidy` (html-tidy.org) is not installed; diffs will not be generated" ) ;
1118+ }
1119+
1120+ if !config. profiler_runtime && config. mode == Mode :: CoverageRun {
1121+ let actioned = if config. bless { "blessed" } else { "checked" } ;
1122+ eprintln ! (
1123+ r#"
1124+ WARNING: profiler runtime is not available, so `.coverage` files won't be {actioned}
1125+ help: try setting `profiler = true` in the `[build]` section of `bootstrap.toml`"#
1126+ ) ;
1127+ }
1128+ }
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ use std::env;
22use std:: io:: IsTerminal ;
33use std:: sync:: Arc ;
44
5- use compiletest:: common:: Mode ;
6- use compiletest:: { log_config, parse_config, run_tests} ;
5+ use compiletest:: { early_config_check, log_config, parse_config, run_tests} ;
76
87fn main ( ) {
98 tracing_subscriber:: fmt:: init ( ) ;
@@ -18,18 +17,7 @@ fn main() {
1817
1918 let config = Arc :: new ( parse_config ( env:: args ( ) . collect ( ) ) ) ;
2019
21- if !config. has_html_tidy && config. mode == Mode :: Rustdoc {
22- eprintln ! ( "warning: `tidy` (html-tidy.org) is not installed; diffs will not be generated" ) ;
23- }
24-
25- if !config. profiler_runtime && config. mode == Mode :: CoverageRun {
26- let actioned = if config. bless { "blessed" } else { "checked" } ;
27- eprintln ! (
28- r#"
29- WARNING: profiler runtime is not available, so `.coverage` files won't be {actioned}
30- help: try setting `profiler = true` in the `[build]` section of `bootstrap.toml`"#
31- ) ;
32- }
20+ early_config_check ( & config) ;
3321
3422 log_config ( & config) ;
3523 run_tests ( config) ;
You can’t perform that action at this time.
0 commit comments