@@ -38,8 +38,8 @@ use walkdir::WalkDir;
3838
3939use self :: directives:: { EarlyProps , make_test_description} ;
4040use crate :: common:: {
41- CodegenBackend , CompareMode , Config , Debugger , PassMode , TestMode , TestPaths , UI_EXTENSIONS ,
42- expected_output_path, output_base_dir, output_relative_path,
41+ CodegenBackend , CompareMode , Config , Debugger , PassMode , RootTestPaths , TestMode ,
42+ UI_EXTENSIONS , expected_output_path, output_base_dir, output_relative_path,
4343} ;
4444use crate :: directives:: { AuxProps , DirectivesCache , FileDirectives } ;
4545use crate :: edition:: parse_edition;
@@ -773,7 +773,7 @@ fn collect_tests_from_dir(
773773 if cx. config . mode == TestMode :: RunMake {
774774 let mut collector = TestCollector :: new ( ) ;
775775 if dir. join ( "rmake.rs" ) . exists ( ) {
776- let paths = TestPaths {
776+ let paths = RootTestPaths {
777777 file : dir. to_path_buf ( ) ,
778778 relative_dir : relative_dir_path. parent ( ) . unwrap ( ) . to_path_buf ( ) ,
779779 } ;
@@ -814,8 +814,10 @@ fn collect_tests_from_dir(
814814 let rel_test_path = relative_dir_path. join ( file_path. file_stem ( ) . unwrap ( ) ) ;
815815 collector. found_path_stems . insert ( rel_test_path) ;
816816
817- let paths =
818- TestPaths { file : file_path, relative_dir : relative_dir_path. to_path_buf ( ) } ;
817+ let paths = RootTestPaths {
818+ file : file_path,
819+ relative_dir : relative_dir_path. to_path_buf ( ) ,
820+ } ;
819821 make_test ( cx, & mut collector, & paths) ;
820822 } else if file_path. is_dir ( ) {
821823 // Recurse to find more tests in a subdirectory.
@@ -852,7 +854,7 @@ fn is_test(file_name: &str) -> bool {
852854
853855/// For a single test file, creates one or more test structures (one per revision) that can be
854856/// handed over to the executor to run, possibly in parallel.
855- fn make_test ( cx : & TestCollectorCx , collector : & mut TestCollector , testpaths : & TestPaths ) {
857+ fn make_test ( cx : & TestCollectorCx , collector : & mut TestCollector , testpaths : & RootTestPaths ) {
856858 // For run-make tests, each "test file" is actually a _directory_ containing an `rmake.rs`. But
857859 // for the purposes of directive parsing, we want to look at that recipe file, not the directory
858860 // itself.
@@ -929,7 +931,11 @@ fn make_test(cx: &TestCollectorCx, collector: &mut TestCollector, testpaths: &Te
929931
930932/// The path of the `stamp` file that gets created or updated whenever a
931933/// particular test completes successfully.
932- fn stamp_file_path ( config : & Config , testpaths : & TestPaths , revision : Option < & str > ) -> Utf8PathBuf {
934+ fn stamp_file_path (
935+ config : & Config ,
936+ testpaths : & RootTestPaths ,
937+ revision : Option < & str > ,
938+ ) -> Utf8PathBuf {
933939 output_base_dir ( config, testpaths, revision) . join ( "stamp" )
934940}
935941
@@ -939,7 +945,7 @@ fn stamp_file_path(config: &Config, testpaths: &TestPaths, revision: Option<&str
939945/// (Might be inaccurate in some cases.)
940946fn files_related_to_test (
941947 config : & Config ,
942- testpaths : & TestPaths ,
948+ testpaths : & RootTestPaths ,
943949 aux_props : & AuxProps ,
944950 revision : Option < & str > ,
945951) -> Vec < Utf8PathBuf > {
@@ -985,7 +991,7 @@ fn files_related_to_test(
985991/// flag can be used to ignore up-to-date checking and always re-run tests.)
986992fn is_up_to_date (
987993 cx : & TestCollectorCx ,
988- testpaths : & TestPaths ,
994+ testpaths : & RootTestPaths ,
989995 aux_props : & AuxProps ,
990996 revision : Option < & str > ,
991997) -> bool {
@@ -1061,7 +1067,7 @@ impl Stamp {
10611067/// Creates a name for this test/revision that can be handed over to the executor.
10621068fn make_test_name_and_filterable_path (
10631069 config : & Config ,
1064- testpaths : & TestPaths ,
1070+ testpaths : & RootTestPaths ,
10651071 revision : Option < & str > ,
10661072) -> ( String , Utf8PathBuf ) {
10671073 // Print the name of the file, relative to the sources root.
0 commit comments