File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -320,11 +320,13 @@ const PATH_REMAP: &[(&str, &[&str])] = &[
320320 (
321321 "tests" ,
322322 & [
323+ // tidy-alphabetical-start
323324 "tests/assembly" ,
324325 "tests/codegen" ,
325326 "tests/codegen-units" ,
326327 "tests/coverage" ,
327328 "tests/coverage-run-rustdoc" ,
329+ "tests/crashes" ,
328330 "tests/debuginfo" ,
329331 "tests/incremental" ,
330332 "tests/mir-opt" ,
@@ -340,6 +342,7 @@ const PATH_REMAP: &[(&str, &[&str])] = &[
340342 "tests/rustdoc-ui" ,
341343 "tests/ui" ,
342344 "tests/ui-fulldeps" ,
345+ // tidy-alphabetical-end
343346 ] ,
344347 ) ,
345348] ;
Original file line number Diff line number Diff line change @@ -128,6 +128,26 @@ fn validate_path_remap() {
128128 } ) ;
129129}
130130
131+ #[ test]
132+ fn check_missing_paths_for_x_test_tests ( ) {
133+ let build = Build :: new ( configure ( "test" , & [ "A-A" ] , & [ "A-A" ] ) ) ;
134+
135+ let ( _, tests_remap_paths) =
136+ PATH_REMAP . iter ( ) . find ( |( target_path, _) | * target_path == "tests" ) . unwrap ( ) ;
137+
138+ let tests_dir = fs:: read_dir ( build. src . join ( "tests" ) ) . unwrap ( ) ;
139+ for dir in tests_dir {
140+ let path = dir. unwrap ( ) . path ( ) ;
141+
142+ // Skip if not a test directory.
143+ if path. ends_with ( "tests/auxiliary" ) || !path. is_dir ( ) {
144+ continue
145+ }
146+
147+ assert ! ( tests_remap_paths. iter( ) . any( |item| path. ends_with( * item) ) , "{} is missing in PATH_REMAP tests list." , path. display( ) ) ;
148+ }
149+ }
150+
131151#[ test]
132152fn test_exclude ( ) {
133153 let mut config = configure ( "test" , & [ "A-A" ] , & [ "A-A" ] ) ;
You can’t perform that action at this time.
0 commit comments