@@ -130,7 +130,7 @@ impl PathSet {
130
130
fn has ( & self , needle : & Path ) -> bool {
131
131
match self {
132
132
PathSet :: Set ( set) => set. iter ( ) . any ( |p| p. ends_with ( needle) ) ,
133
- PathSet :: Suite ( _ ) => false ,
133
+ PathSet :: Suite ( suite ) => suite . ends_with ( needle ) ,
134
134
}
135
135
}
136
136
@@ -1844,7 +1844,7 @@ mod __test {
1844
1844
) ;
1845
1845
1846
1846
// Ensure we don't build any compiler artifacts.
1847
- assert ! ( builder. cache. all :: <compile:: Rustc >( ) . is_empty ( ) ) ;
1847
+ assert ! ( ! builder. cache. contains :: <compile:: Rustc >( ) ) ;
1848
1848
assert_eq ! (
1849
1849
first( builder. cache. all:: <test:: Crate >( ) ) ,
1850
1850
& [ test:: Crate {
@@ -1856,4 +1856,34 @@ mod __test {
1856
1856
} , ]
1857
1857
) ;
1858
1858
}
1859
+
1860
+ #[ test]
1861
+ fn test_exclude ( ) {
1862
+ let mut config = configure ( & [ ] , & [ ] ) ;
1863
+ config. exclude = vec ! [
1864
+ "src/test/run-pass" . into( ) ,
1865
+ "src/tools/tidy" . into( ) ,
1866
+ ] ;
1867
+ config. cmd = Subcommand :: Test {
1868
+ paths : Vec :: new ( ) ,
1869
+ test_args : Vec :: new ( ) ,
1870
+ rustc_args : Vec :: new ( ) ,
1871
+ fail_fast : true ,
1872
+ doc_tests : DocTests :: No ,
1873
+ bless : false ,
1874
+ compare_mode : None ,
1875
+ } ;
1876
+
1877
+ let build = Build :: new ( config) ;
1878
+ let builder = Builder :: new ( & build) ;
1879
+ builder. run_step_descriptions ( & Builder :: get_step_descriptions ( Kind :: Test ) , & [ ] ) ;
1880
+
1881
+ // Ensure we have really excluded run-pass & tidy
1882
+ assert ! ( !builder. cache. contains:: <test:: RunPass >( ) ) ;
1883
+ assert ! ( !builder. cache. contains:: <test:: Tidy >( ) ) ;
1884
+
1885
+ // Ensure other tests are not affected.
1886
+ assert ! ( builder. cache. contains:: <test:: RunPassFullDeps >( ) ) ;
1887
+ assert ! ( builder. cache. contains:: <test:: RustdocUi >( ) ) ;
1888
+ }
1859
1889
}
0 commit comments