@@ -22,13 +22,7 @@ fn configure(cmd: &str, host: &[&str], target: &[&str]) -> Config {
22
22
}
23
23
24
24
fn configure_with_args ( cmd : & [ & str ] , host : & [ & str ] , target : & [ & str ] ) -> Config {
25
- TestCtx :: new ( )
26
- . config ( cmd[ 0 ] )
27
- . args ( & cmd[ 1 ..] )
28
- . hosts ( host)
29
- . targets ( target)
30
- . args ( & [ "--build" , TEST_TRIPLE_1 ] )
31
- . create_config ( )
25
+ TestCtx :: new ( ) . config ( cmd[ 0 ] ) . args ( & cmd[ 1 ..] ) . hosts ( host) . targets ( target) . create_config ( )
32
26
}
33
27
34
28
fn first < A , B > ( v : Vec < ( A , B ) > ) -> Vec < A > {
@@ -236,6 +230,7 @@ mod dist {
236
230
237
231
use super :: { Config , TEST_TRIPLE_1 , TEST_TRIPLE_2 , TEST_TRIPLE_3 , first, run_build} ;
238
232
use crate :: Flags ;
233
+ use crate :: core:: builder:: tests:: host_target;
239
234
use crate :: core:: builder:: * ;
240
235
241
236
fn configure ( host : & [ & str ] , target : & [ & str ] ) -> Config {
@@ -244,11 +239,11 @@ mod dist {
244
239
245
240
#[ test]
246
241
fn llvm_out_behaviour ( ) {
247
- let mut config = configure ( & [ TEST_TRIPLE_1 ] , & [ TEST_TRIPLE_2 ] ) ;
242
+ let mut config = configure ( & [ ] , & [ TEST_TRIPLE_2 ] ) ;
248
243
config. llvm_from_ci = true ;
249
244
let build = Build :: new ( config. clone ( ) ) ;
250
245
251
- let target = TargetSelection :: from_user ( TEST_TRIPLE_1 ) ;
246
+ let target = TargetSelection :: from_user ( & host_target ( ) ) ;
252
247
assert ! ( build. llvm_out( target) . ends_with( "ci-llvm" ) ) ;
253
248
let target = TargetSelection :: from_user ( TEST_TRIPLE_2 ) ;
254
249
assert ! ( build. llvm_out( target) . ends_with( "llvm" ) ) ;
@@ -313,14 +308,14 @@ mod sysroot_target_dirs {
313
308
/// cg_gcc tests instead.
314
309
#[ test]
315
310
fn test_test_compiler ( ) {
316
- let config = configure_with_args ( & [ "test" , "compiler" ] , & [ TEST_TRIPLE_1 ] , & [ TEST_TRIPLE_1 ] ) ;
311
+ let config = configure_with_args ( & [ "test" , "compiler" ] , & [ ] , & [ TEST_TRIPLE_1 ] ) ;
317
312
let cache = run_build ( & config. paths . clone ( ) , config) ;
318
313
319
314
let compiler = cache. contains :: < test:: CrateLibrustc > ( ) ;
320
315
let cranelift = cache. contains :: < test:: CodegenCranelift > ( ) ;
321
316
let gcc = cache. contains :: < test:: CodegenGCC > ( ) ;
322
317
323
- assert_eq ! ( ( compiler, cranelift, gcc) , ( true , false , false ) ) ;
318
+ assert_eq ! ( ( compiler, cranelift, gcc) , ( false , false , false ) ) ;
324
319
}
325
320
326
321
#[ test]
@@ -346,7 +341,7 @@ fn test_test_coverage() {
346
341
// Print each test case so that if one fails, the most recently printed
347
342
// case is the one that failed.
348
343
println ! ( "Testing case: {cmd:?}" ) ;
349
- let config = configure_with_args ( cmd, & [ TEST_TRIPLE_1 ] , & [ TEST_TRIPLE_1 ] ) ;
344
+ let config = configure_with_args ( cmd, & [ ] , & [ TEST_TRIPLE_1 ] ) ;
350
345
let mut cache = run_build ( & config. paths . clone ( ) , config) ;
351
346
352
347
let modes =
0 commit comments