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>) {
1111
1111
) ;
1112
1112
}
1113
1113
}
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;
2
2
use std:: io:: IsTerminal ;
3
3
use std:: sync:: Arc ;
4
4
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} ;
7
6
8
7
fn main ( ) {
9
8
tracing_subscriber:: fmt:: init ( ) ;
@@ -18,18 +17,7 @@ fn main() {
18
17
19
18
let config = Arc :: new ( parse_config ( env:: args ( ) . collect ( ) ) ) ;
20
19
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) ;
33
21
34
22
log_config ( & config) ;
35
23
run_tests ( config) ;
You can’t perform that action at this time.
0 commit comments