@@ -1522,6 +1522,12 @@ test!(Pretty {
15221522} ) ; 
15231523
15241524test ! ( 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+ } ) ; 
15251531
15261532test ! ( AssemblyLlvm  { 
15271533    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
18161822
18171823        let  is_rustdoc = suite == "rustdoc-ui"  || suite == "rustdoc-js" ; 
18181824
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. 
18191839        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- 
18341840            // We need to pass the compiler that was used to compile run-make-support, 
18351841            // because we have to use the same compiler to compile rmake.rs recipes. 
18361842            let  stage0_rustc_path = builder. compiler ( 0 ,  test_compiler. host ) ; 
18371843            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+             } 
18381860        } 
18391861
18401862        // Avoid depending on rustdoc when we don't need it. 
0 commit comments