@@ -22,13 +22,7 @@ fn configure(cmd: &str, host: &[&str], target: &[&str]) -> Config {
2222}
2323
2424fn 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 ( )
3226}
3327
3428fn first < A , B > ( v : Vec < ( A , B ) > ) -> Vec < A > {
@@ -236,6 +230,7 @@ mod dist {
236230
237231 use super :: { Config , TEST_TRIPLE_1 , TEST_TRIPLE_2 , TEST_TRIPLE_3 , first, run_build} ;
238232 use crate :: Flags ;
233+ use crate :: core:: builder:: tests:: host_target;
239234 use crate :: core:: builder:: * ;
240235
241236 fn configure ( host : & [ & str ] , target : & [ & str ] ) -> Config {
@@ -244,11 +239,11 @@ mod dist {
244239
245240 #[ test]
246241 fn llvm_out_behaviour ( ) {
247- let mut config = configure ( & [ TEST_TRIPLE_1 ] , & [ TEST_TRIPLE_2 ] ) ;
242+ let mut config = configure ( & [ ] , & [ TEST_TRIPLE_2 ] ) ;
248243 config. llvm_from_ci = true ;
249244 let build = Build :: new ( config. clone ( ) ) ;
250245
251- let target = TargetSelection :: from_user ( TEST_TRIPLE_1 ) ;
246+ let target = TargetSelection :: from_user ( & host_target ( ) ) ;
252247 assert ! ( build. llvm_out( target) . ends_with( "ci-llvm" ) ) ;
253248 let target = TargetSelection :: from_user ( TEST_TRIPLE_2 ) ;
254249 assert ! ( build. llvm_out( target) . ends_with( "llvm" ) ) ;
@@ -313,14 +308,14 @@ mod sysroot_target_dirs {
313308/// cg_gcc tests instead.
314309#[ test]
315310fn 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 ] ) ;
317312 let cache = run_build ( & config. paths . clone ( ) , config) ;
318313
319314 let compiler = cache. contains :: < test:: CrateLibrustc > ( ) ;
320315 let cranelift = cache. contains :: < test:: CodegenCranelift > ( ) ;
321316 let gcc = cache. contains :: < test:: CodegenGCC > ( ) ;
322317
323- assert_eq ! ( ( compiler, cranelift, gcc) , ( true , false , false ) ) ;
318+ assert_eq ! ( ( compiler, cranelift, gcc) , ( false , false , false ) ) ;
324319}
325320
326321#[ test]
@@ -346,7 +341,7 @@ fn test_test_coverage() {
346341 // Print each test case so that if one fails, the most recently printed
347342 // case is the one that failed.
348343 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 ] ) ;
350345 let mut cache = run_build ( & config. paths . clone ( ) , config) ;
351346
352347 let modes =
0 commit comments