4
4
mod tests;
5
5
6
6
pub mod cli;
7
- pub mod common;
7
+ mod common;
8
8
mod debuggers;
9
- pub mod diagnostics;
10
- pub mod directives;
11
- pub mod edition;
12
- pub mod errors;
9
+ mod diagnostics;
10
+ mod directives;
11
+ mod edition;
12
+ mod errors;
13
13
mod executor;
14
14
mod json;
15
15
mod output_capture;
16
16
mod panic_hook;
17
17
mod raise_fd_limit;
18
18
mod read2;
19
- pub mod runtest;
19
+ mod runtest;
20
20
pub mod rustdoc_gui_test;
21
- pub mod util;
21
+ mod util;
22
22
23
23
use core:: panic;
24
24
use std:: collections:: HashSet ;
@@ -50,7 +50,7 @@ use crate::executor::{CollectedTest, ColorConfig};
50
50
/// The config mostly reflects command-line arguments, but there might also be
51
51
/// some code here that inspects environment variables or even runs executables
52
52
/// (e.g. when discovering debugger versions).
53
- pub fn parse_config ( args : Vec < String > ) -> Config {
53
+ fn parse_config ( args : Vec < String > ) -> Config {
54
54
let mut opts = Options :: new ( ) ;
55
55
opts. reqopt ( "" , "compile-lib-path" , "path to host shared libraries" , "PATH" )
56
56
. reqopt ( "" , "run-lib-path" , "path to target shared libraries" , "PATH" )
@@ -464,7 +464,6 @@ pub fn parse_config(args: Vec<String>) -> Config {
464
464
host_linker : matches. opt_str ( "host-linker" ) ,
465
465
llvm_components : matches. opt_str ( "llvm-components" ) . unwrap ( ) ,
466
466
nodejs : matches. opt_str ( "nodejs" ) ,
467
- npm : matches. opt_str ( "npm" ) ,
468
467
469
468
force_rerun : matches. opt_present ( "force-rerun" ) ,
470
469
@@ -488,22 +487,15 @@ pub fn parse_config(args: Vec<String>) -> Config {
488
487
}
489
488
}
490
489
491
- pub fn opt_str ( maybestr : & Option < String > ) -> & str {
492
- match * maybestr {
493
- None => "(none)" ,
494
- Some ( ref s) => s,
495
- }
496
- }
497
-
498
- pub fn opt_str2 ( maybestr : Option < String > ) -> String {
490
+ fn opt_str2 ( maybestr : Option < String > ) -> String {
499
491
match maybestr {
500
492
None => "(none)" . to_owned ( ) ,
501
493
Some ( s) => s,
502
494
}
503
495
}
504
496
505
497
/// Called by `main` after the config has been parsed.
506
- pub fn run_tests ( config : Arc < Config > ) {
498
+ fn run_tests ( config : Arc < Config > ) {
507
499
debug ! ( ?config, "run_tests" ) ;
508
500
509
501
panic_hook:: install_panic_hook ( ) ;
@@ -641,7 +633,7 @@ impl TestCollector {
641
633
/// FIXME(Zalathar): Now that we no longer rely on libtest, try to overhaul
642
634
/// test discovery to take into account the filters/tests specified on the
643
635
/// command-line, instead of having to enumerate everything.
644
- pub ( crate ) fn collect_and_make_tests ( config : Arc < Config > ) -> Vec < CollectedTest > {
636
+ fn collect_and_make_tests ( config : Arc < Config > ) -> Vec < CollectedTest > {
645
637
debug ! ( "making tests from {}" , config. src_test_suite_root) ;
646
638
let common_inputs_stamp = common_inputs_stamp ( & config) ;
647
639
let modified_tests =
@@ -853,7 +845,7 @@ fn collect_tests_from_dir(
853
845
}
854
846
855
847
/// Returns true if `file_name` looks like a proper test file name.
856
- pub fn is_test ( file_name : & str ) -> bool {
848
+ fn is_test ( file_name : & str ) -> bool {
857
849
if !file_name. ends_with ( ".rs" ) {
858
850
return false ;
859
851
}
@@ -1133,7 +1125,7 @@ fn check_for_overlapping_test_paths(found_path_stems: &HashSet<Utf8PathBuf>) {
1133
1125
}
1134
1126
}
1135
1127
1136
- pub fn early_config_check ( config : & Config ) {
1128
+ fn early_config_check ( config : & Config ) {
1137
1129
if !config. has_html_tidy && config. mode == TestMode :: Rustdoc {
1138
1130
warning ! ( "`tidy` (html-tidy.org) is not installed; diffs will not be generated" ) ;
1139
1131
}
0 commit comments