@@ -90,7 +90,7 @@ impl Step for CrateBootstrap {
90
90
) ;
91
91
92
92
let crate_name = path. rsplit_once ( '/' ) . unwrap ( ) . 1 ;
93
- run_cargo_test ( cargo, & [ ] , & [ ] , crate_name, crate_name , bootstrap_host, builder) ;
93
+ run_cargo_test ( cargo, & [ ] , & [ ] , crate_name, bootstrap_host, builder) ;
94
94
}
95
95
}
96
96
@@ -140,15 +140,7 @@ You can skip linkcheck with --skip src/tools/linkchecker"
140
140
SourceType :: InTree ,
141
141
& [ ] ,
142
142
) ;
143
- run_cargo_test (
144
- cargo,
145
- & [ ] ,
146
- & [ ] ,
147
- "linkchecker" ,
148
- "linkchecker self tests" ,
149
- bootstrap_host,
150
- builder,
151
- ) ;
143
+ run_cargo_test ( cargo, & [ ] , & [ ] , "linkchecker self tests" , bootstrap_host, builder) ;
152
144
153
145
if builder. doc_tests == DocTests :: No {
154
146
return ;
@@ -331,7 +323,7 @@ impl Step for Cargo {
331
323
) ;
332
324
333
325
// NOTE: can't use `run_cargo_test` because we need to overwrite `PATH`
334
- let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "cargo" , self . host , builder) ;
326
+ let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , self . host , builder) ;
335
327
336
328
// Don't run cross-compile tests, we may not have cross-compiled libstd libs
337
329
// available.
@@ -417,7 +409,7 @@ impl Step for RustAnalyzer {
417
409
cargo. env ( "SKIP_SLOW_TESTS" , "1" ) ;
418
410
419
411
cargo. add_rustc_lib_path ( builder) ;
420
- run_cargo_test ( cargo, & [ ] , & [ ] , "rust-analyzer" , "rust-analyzer" , host, builder) ;
412
+ run_cargo_test ( cargo, & [ ] , & [ ] , "rust-analyzer" , host, builder) ;
421
413
}
422
414
}
423
415
@@ -466,7 +458,7 @@ impl Step for Rustfmt {
466
458
467
459
cargo. add_rustc_lib_path ( builder) ;
468
460
469
- run_cargo_test ( cargo, & [ ] , & [ ] , "rustfmt" , "rustfmt" , host, builder) ;
461
+ run_cargo_test ( cargo, & [ ] , & [ ] , "rustfmt" , host, builder) ;
470
462
}
471
463
}
472
464
@@ -582,7 +574,7 @@ impl Step for Miri {
582
574
583
575
// We can NOT use `run_cargo_test` since Miri's integration tests do not use the usual test
584
576
// harness and therefore do not understand the flags added by `add_flags_and_try_run_test`.
585
- let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "miri" , host, builder) ;
577
+ let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , host, builder) ;
586
578
587
579
// miri tests need to know about the stage sysroot
588
580
cargo. env ( "MIRI_SYSROOT" , & miri_sysroot) ;
@@ -730,7 +722,7 @@ impl Step for CompiletestTest {
730
722
& [ ] ,
731
723
) ;
732
724
cargo. allow_features ( "test" ) ;
733
- run_cargo_test ( cargo, & [ ] , & [ ] , "compiletest" , "compiletest self test", host, builder) ;
725
+ run_cargo_test ( cargo, & [ ] , & [ ] , "compiletest self test" , host, builder) ;
734
726
}
735
727
}
736
728
@@ -791,7 +783,7 @@ impl Step for Clippy {
791
783
cargo. env ( "HOST_LIBS" , host_libs) ;
792
784
793
785
cargo. add_rustc_lib_path ( builder) ;
794
- let cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "clippy" , host, builder) ;
786
+ let cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , host, builder) ;
795
787
796
788
let _guard = builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , "clippy" , host, host) ;
797
789
@@ -1318,15 +1310,7 @@ impl Step for CrateRunMakeSupport {
1318
1310
& [ ] ,
1319
1311
) ;
1320
1312
cargo. allow_features ( "test" ) ;
1321
- run_cargo_test (
1322
- cargo,
1323
- & [ ] ,
1324
- & [ ] ,
1325
- "run-make-support" ,
1326
- "run-make-support self test" ,
1327
- host,
1328
- builder,
1329
- ) ;
1313
+ run_cargo_test ( cargo, & [ ] , & [ ] , "run-make-support self test" , host, builder) ;
1330
1314
}
1331
1315
}
1332
1316
@@ -1363,7 +1347,7 @@ impl Step for CrateBuildHelper {
1363
1347
& [ ] ,
1364
1348
) ;
1365
1349
cargo. allow_features ( "test" ) ;
1366
- run_cargo_test ( cargo, & [ ] , & [ ] , "build_helper" , "build_helper self test", host, builder) ;
1350
+ run_cargo_test ( cargo, & [ ] , & [ ] , "build_helper self test" , host, builder) ;
1367
1351
}
1368
1352
}
1369
1353
@@ -2569,13 +2553,12 @@ fn run_cargo_test<'a>(
2569
2553
cargo : builder:: Cargo ,
2570
2554
libtest_args : & [ & str ] ,
2571
2555
crates : & [ String ] ,
2572
- primary_crate : & str ,
2573
2556
description : impl Into < Option < & ' a str > > ,
2574
2557
target : TargetSelection ,
2575
2558
builder : & Builder < ' _ > ,
2576
2559
) -> bool {
2577
2560
let compiler = cargo. compiler ( ) ;
2578
- let mut cargo = prepare_cargo_test ( cargo, libtest_args, crates, primary_crate , target, builder) ;
2561
+ let mut cargo = prepare_cargo_test ( cargo, libtest_args, crates, target, builder) ;
2579
2562
let _time = helpers:: timeit ( builder) ;
2580
2563
let _group = description. into ( ) . and_then ( |what| {
2581
2564
builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , what, compiler. host , target)
@@ -2599,7 +2582,6 @@ fn prepare_cargo_test(
2599
2582
cargo : builder:: Cargo ,
2600
2583
libtest_args : & [ & str ] ,
2601
2584
crates : & [ String ] ,
2602
- primary_crate : & str ,
2603
2585
target : TargetSelection ,
2604
2586
builder : & Builder < ' _ > ,
2605
2587
) -> BootstrapCommand {
@@ -2629,13 +2611,6 @@ fn prepare_cargo_test(
2629
2611
cargo. arg ( "--doc" ) ;
2630
2612
}
2631
2613
DocTests :: No => {
2632
- let krate = & builder
2633
- . crates
2634
- . get ( primary_crate)
2635
- . unwrap_or_else ( || panic ! ( "missing crate {primary_crate}" ) ) ;
2636
- if krate. has_lib {
2637
- cargo. arg ( "--lib" ) ;
2638
- }
2639
2614
cargo. args ( [ "--bins" , "--examples" , "--tests" , "--benches" ] ) ;
2640
2615
}
2641
2616
DocTests :: Yes => { }
@@ -2814,7 +2789,6 @@ impl Step for Crate {
2814
2789
cargo,
2815
2790
& [ ] ,
2816
2791
& self . crates ,
2817
- & self . crates [ 0 ] ,
2818
2792
& * crate_description ( & self . crates ) ,
2819
2793
target,
2820
2794
builder,
@@ -2911,15 +2885,7 @@ impl Step for CrateRustdoc {
2911
2885
dylib_path. insert ( 0 , PathBuf :: from ( & * libdir) ) ;
2912
2886
cargo. env ( dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
2913
2887
2914
- run_cargo_test (
2915
- cargo,
2916
- & [ ] ,
2917
- & [ "rustdoc:0.0.0" . to_string ( ) ] ,
2918
- "rustdoc" ,
2919
- "rustdoc" ,
2920
- target,
2921
- builder,
2922
- ) ;
2888
+ run_cargo_test ( cargo, & [ ] , & [ "rustdoc:0.0.0" . to_string ( ) ] , "rustdoc" , target, builder) ;
2923
2889
}
2924
2890
}
2925
2891
@@ -2976,7 +2942,6 @@ impl Step for CrateRustdocJsonTypes {
2976
2942
libtest_args,
2977
2943
& [ "rustdoc-json-types" . to_string ( ) ] ,
2978
2944
"rustdoc-json-types" ,
2979
- "rustdoc-json-types" ,
2980
2945
target,
2981
2946
builder,
2982
2947
) ;
@@ -3156,7 +3121,7 @@ impl Step for Bootstrap {
3156
3121
3157
3122
// bootstrap tests are racy on directory creation so just run them one at a time.
3158
3123
// Since there's not many this shouldn't be a problem.
3159
- run_cargo_test ( cargo, & [ "--test-threads=1" ] , & [ ] , "bootstrap" , None , host, builder) ;
3124
+ run_cargo_test ( cargo, & [ "--test-threads=1" ] , & [ ] , None , host, builder) ;
3160
3125
}
3161
3126
3162
3127
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
@@ -3281,7 +3246,7 @@ impl Step for RustInstaller {
3281
3246
bootstrap_host,
3282
3247
bootstrap_host,
3283
3248
) ;
3284
- run_cargo_test ( cargo, & [ ] , & [ ] , "installer" , None , bootstrap_host, builder) ;
3249
+ run_cargo_test ( cargo, & [ ] , & [ ] , None , bootstrap_host, builder) ;
3285
3250
3286
3251
// We currently don't support running the test.sh script outside linux(?) environments.
3287
3252
// Eventually this should likely migrate to #[test]s in rust-installer proper rather than a
@@ -3672,7 +3637,7 @@ impl Step for TestFloatParse {
3672
3637
& [ ] ,
3673
3638
) ;
3674
3639
3675
- run_cargo_test ( cargo_test, & [ ] , & [ ] , crate_name, crate_name , bootstrap_host, builder) ;
3640
+ run_cargo_test ( cargo_test, & [ ] , & [ ] , crate_name, bootstrap_host, builder) ;
3676
3641
3677
3642
// Run the actual parse tests.
3678
3643
let mut cargo_run = tool:: prepare_tool_cargo (
0 commit comments