@@ -268,10 +268,47 @@ pub fn krate(build: &Build,
268
268
compiler : & Compiler ,
269
269
target : & str ,
270
270
mode : Mode ) {
271
- let ( name, path, features) = match mode {
272
- Mode :: Libstd => ( "libstd" , "src/rustc/std_shim" , build. std_features ( ) ) ,
273
- Mode :: Libtest => ( "libtest" , "src/rustc/test_shim" , String :: new ( ) ) ,
274
- Mode :: Librustc => ( "librustc" , "src/rustc" , build. rustc_features ( ) ) ,
271
+ let ( name, path, features, excluded) = match mode {
272
+ Mode :: Libstd => {
273
+ let excluded = vec ! [
274
+ "alloc_jemalloc" , "arena" , "bootstrap" , "cargotest" , "compiletest" ,
275
+ "error_index_generator" , "flate" , "fmt_macros" , "getopts" , "graphviz" ,
276
+ "linkchecker" , "log" , "proc_macro" , "rbml" , "rustbook" , "rustc" , "rustc-main" ,
277
+ "rustc_back" , "rustc_bitflags" , "rustc_borrowck" , "rustc_const_eval" ,
278
+ "rustc_const_math" , "rustc_data_structures" , "rustc_driver" , "rustc_errors" ,
279
+ "rustc_incremental" , "rustc_lint" , "rustc_llvm" , "rustc_metadata" , "rustc_mir" ,
280
+ "rustc_passes" , "rustc_platform_intrinsics" , "rustc_plugin" , "rustc_privacy" ,
281
+ "rustc_resolve" , "rustc_save_analysis" , "rustc_trans" , "rustc_typeck" , "rustdoc" ,
282
+ "serialize" , "syntax" , "syntax_ext" , "syntax_pos" , "term" , "test" , "test_shim" ,
283
+ "tidy" , "unwind" ,
284
+ ] ;
285
+ ( "libstd" , "src/rustc/std_shim" , build. std_features ( ) , excluded)
286
+ }
287
+ Mode :: Libtest => {
288
+ let excluded = vec ! [
289
+ "alloc" , "alloc_jemalloc" , "alloc_system" , "arena" , "bootstrap" , "build_helper" ,
290
+ "cargotest" , "collections" , "compiletest" , "core" , "error_index_generator" ,
291
+ "flate" , "fmt_macros" , "graphviz" , "libc" , "linkchecker" , "log" , "panic_abort" ,
292
+ "panic_unwind" , "proc_macro" , "rand" , "rbml" , "rustbook" , "rustc" , "rustc-main" ,
293
+ "rustc_back" , "rustc_bitflags" , "rustc_borrowck" , "rustc_const_eval" ,
294
+ "rustc_const_math" , "rustc_data_structures" , "rustc_driver" , "rustc_errors" ,
295
+ "rustc_incremental" , "rustc_lint" , "rustc_llvm" , "rustc_metadata" , "rustc_mir" ,
296
+ "rustc_passes" , "rustc_platform_intrinsics" , "rustc_plugin" , "rustc_privacy" ,
297
+ "rustc_resolve" , "rustc_save_analysis" , "rustc_trans" , "rustc_typeck" ,
298
+ "rustc_unicode" , "rustdoc" , "serialize" , "std" , "std_shim" , "syntax" , "syntax_ext" ,
299
+ "syntax_pos" , "tidy" , "unwind" ,
300
+ ] ;
301
+ ( "libtest" , "src/rustc/test_shim" , String :: new ( ) , excluded)
302
+ }
303
+ Mode :: Librustc => {
304
+ let excluded = vec ! [
305
+ "alloc" , "alloc_jemalloc" , "alloc_system" , "bootstrap" , "cargotest" , "collections" ,
306
+ "compiletest" , "core" , "error_index_generator" , "getopts" , "libc" , "linkchecker" ,
307
+ "panic_abort" , "panic_unwind" , "rand" , "rustbook" , "rustc_unicode" , "std" ,
308
+ "std_shim" , "term" , "test" , "test_shim" , "tidy" , "unwind" ,
309
+ ] ;
310
+ ( "librustc" , "src/rustc" , build. rustc_features ( ) , excluded)
311
+ }
275
312
_ => panic ! ( "can only test libraries" ) ,
276
313
} ;
277
314
println ! ( "Testing {} stage{} ({} -> {})" , name, compiler. stage,
@@ -285,7 +322,7 @@ pub fn krate(build: &Build,
285
322
286
323
// Generate a list of `-p` arguments to pass to the `cargo test` invocation
287
324
// by crawling the corresponding Cargo.lock file.
288
- let lockfile = build. src . join ( path ) . join ( "Cargo.lock" ) ;
325
+ let lockfile = build. src . join ( "src" ) . join ( "Cargo.lock" ) ;
289
326
let mut contents = String :: new ( ) ;
290
327
t ! ( t!( File :: open( & lockfile) ) . read_to_string( & mut contents) ) ;
291
328
let mut lines = contents. lines ( ) ;
@@ -305,10 +342,7 @@ pub fn krate(build: &Build,
305
342
306
343
let crate_name = & line[ prefix. len ( ) ..line. len ( ) - 1 ] ;
307
344
308
- // Right now jemalloc is our only target-specific crate in the sense
309
- // that it's not present on all platforms. Custom skip it here for now,
310
- // but if we add more this probably wants to get more generalized.
311
- if crate_name. contains ( "jemalloc" ) {
345
+ if excluded. contains ( & crate_name) {
312
346
continue
313
347
}
314
348
0 commit comments