@@ -63,7 +63,8 @@ pub fn parse_config(args: Vec<String>) -> Config {
6363 . optopt ( "" , "llvm-filecheck" , "path to LLVM's FileCheck binary" , "DIR" )
6464 . reqopt ( "" , "src-root" , "directory containing sources" , "PATH" )
6565 . reqopt ( "" , "src-test-suite-root" , "directory containing test suite sources" , "PATH" )
66- . reqopt ( "" , "build-base" , "directory to deposit test outputs" , "PATH" )
66+ . reqopt ( "" , "build-root" , "path to root build directory" , "PATH" )
67+ . reqopt ( "" , "build-test-suite-root" , "path to test suite specific build directory" , "PATH" )
6768 . reqopt ( "" , "sysroot-base" , "directory containing the compiler sysroot" , "PATH" )
6869 . reqopt ( "" , "stage" , "stage number under test" , "N" )
6970 . reqopt ( "" , "stage-id" , "the target-stage identifier" , "stageN-TARGET" )
@@ -157,7 +158,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
157158 "" ,
158159 "rustfix-coverage" ,
159160 "enable this to generate a Rustfix coverage file, which is saved in \
160- `./<build_base >/rustfix_missing_coverage.txt`",
161+ `./<build_test_suite_root >/rustfix_missing_coverage.txt`",
161162 )
162163 . optflag ( "" , "force-rerun" , "rerun tests even if the inputs are unchanged" )
163164 . optflag ( "" , "only-modified" , "only run tests that result been modified" )
@@ -309,6 +310,10 @@ pub fn parse_config(args: Vec<String>) -> Config {
309310 src_test_suite_root. display( )
310311 ) ;
311312
313+ let build_root = opt_path ( matches, "build-root" ) ;
314+ let build_test_suite_root = opt_path ( matches, "build-test-suite-root" ) ;
315+ assert ! ( build_test_suite_root. starts_with( & build_root) ) ;
316+
312317 Config {
313318 bless : matches. opt_present ( "bless" ) ,
314319 compile_lib_path : make_absolute ( opt_path ( matches, "compile-lib-path" ) ) ,
@@ -327,7 +332,9 @@ pub fn parse_config(args: Vec<String>) -> Config {
327332 src_root,
328333 src_test_suite_root,
329334
330- build_base : opt_path ( matches, "build-base" ) ,
335+ build_root,
336+ build_test_suite_root,
337+
331338 sysroot_base : opt_path ( matches, "sysroot-base" ) ,
332339
333340 stage,
@@ -438,7 +445,11 @@ pub fn log_config(config: &Config) {
438445 logv ( c, format ! ( "src_root: {}" , config. src_root. display( ) ) ) ;
439446 logv ( c, format ! ( "src_test_suite_root: {}" , config. src_test_suite_root. display( ) ) ) ;
440447
441- logv ( c, format ! ( "build_base: {:?}" , config. build_base. display( ) ) ) ;
448+ logv ( c, format ! ( "build_root: {}" , config. build_root. display( ) ) ) ;
449+ logv ( c, format ! ( "build_test_suite_root: {}" , config. build_test_suite_root. display( ) ) ) ;
450+
451+ logv ( c, format ! ( "sysroot_base: {}" , config. sysroot_base. display( ) ) ) ;
452+
442453 logv ( c, format ! ( "stage: {}" , config. stage) ) ;
443454 logv ( c, format ! ( "stage_id: {}" , config. stage_id) ) ;
444455 logv ( c, format ! ( "mode: {}" , config. mode) ) ;
@@ -488,7 +499,7 @@ pub fn run_tests(config: Arc<Config>) {
488499 // we first make sure that the coverage file does not exist.
489500 // It will be created later on.
490501 if config. rustfix_coverage {
491- let mut coverage_file_path = config. build_base . clone ( ) ;
502+ let mut coverage_file_path = config. build_test_suite_root . clone ( ) ;
492503 coverage_file_path. push ( "rustfix_missing_coverage.txt" ) ;
493504 if coverage_file_path. exists ( ) {
494505 if let Err ( e) = fs:: remove_file ( & coverage_file_path) {
0 commit comments