@@ -1522,6 +1522,12 @@ test!(Pretty {
1522
1522
} ) ;
1523
1523
1524
1524
test ! ( RunMake { path: "tests/run-make" , mode: "run-make" , suite: "run-make" , default : true } ) ;
1525
+ test ! ( RunMakeCargo {
1526
+ path: "tests/run-make-cargo" ,
1527
+ mode: "run-make" ,
1528
+ suite: "run-make-cargo" ,
1529
+ default : true
1530
+ } ) ;
1525
1531
1526
1532
test ! ( AssemblyLlvm {
1527
1533
path: "tests/assembly-llvm" ,
@@ -1816,25 +1822,41 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
1816
1822
1817
1823
let is_rustdoc = suite == "rustdoc-ui" || suite == "rustdoc-js" ;
1818
1824
1825
+ // There are (potentially) 2 `cargo`s to consider:
1826
+ //
1827
+ // - A "bootstrap" cargo, which is the same cargo used to build bootstrap itself, and is
1828
+ // used to build the `run-make` test recipes and the `run-make-support` test library. All
1829
+ // of these may not use unstable rustc/cargo features.
1830
+ // - An in-tree cargo, which should be considered as under test. The `run-make-cargo` test
1831
+ // suite is intended to support the use case of testing the "toolchain" (that is, at the
1832
+ // minimum the interaction between in-tree cargo + rustc) together.
1833
+ //
1834
+ // For build time and iteration purposes, we partition `run-make` tests which needs an
1835
+ // in-tree cargo (a smaller subset) versus `run-make` tests that do not into two test
1836
+ // suites, `run-make` and `run-make-cargo`. That way, contributors who do not need to run
1837
+ // the `run-make` tests that need in-tree cargo do not need to spend time building in-tree
1838
+ // cargo.
1819
1839
if mode == "run-make" {
1820
- let cargo_path = if test_compiler. stage == 0 {
1821
- // If we're using `--stage 0`, we should provide the bootstrap cargo.
1822
- builder. initial_cargo . clone ( )
1823
- } else {
1824
- builder
1825
- . ensure ( tool:: Cargo :: from_build_compiler (
1826
- builder. compiler ( test_compiler. stage - 1 , test_compiler. host ) ,
1827
- test_compiler. host ,
1828
- ) )
1829
- . tool_path
1830
- } ;
1831
-
1832
- cmd. arg ( "--cargo-path" ) . arg ( cargo_path) ;
1833
-
1834
1840
// We need to pass the compiler that was used to compile run-make-support,
1835
1841
// because we have to use the same compiler to compile rmake.rs recipes.
1836
1842
let stage0_rustc_path = builder. compiler ( 0 , test_compiler. host ) ;
1837
1843
cmd. arg ( "--stage0-rustc-path" ) . arg ( builder. rustc ( stage0_rustc_path) ) ;
1844
+
1845
+ if suite == "run-make-cargo" {
1846
+ let cargo_path = if test_compiler. stage == 0 {
1847
+ // If we're using `--stage 0`, we should provide the bootstrap cargo.
1848
+ builder. initial_cargo . clone ( )
1849
+ } else {
1850
+ builder
1851
+ . ensure ( tool:: Cargo :: from_build_compiler (
1852
+ builder. compiler ( test_compiler. stage - 1 , test_compiler. host ) ,
1853
+ test_compiler. host ,
1854
+ ) )
1855
+ . tool_path
1856
+ } ;
1857
+
1858
+ cmd. arg ( "--cargo-path" ) . arg ( cargo_path) ;
1859
+ }
1838
1860
}
1839
1861
1840
1862
// Avoid depending on rustdoc when we don't need it.
0 commit comments