@@ -63,7 +63,8 @@ pub fn parse_config(args: Vec<String>) -> Config {
63
63
. optopt ( "" , "llvm-filecheck" , "path to LLVM's FileCheck binary" , "DIR" )
64
64
. reqopt ( "" , "src-root" , "directory containing sources" , "PATH" )
65
65
. 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" )
67
68
. reqopt ( "" , "sysroot-base" , "directory containing the compiler sysroot" , "PATH" )
68
69
. reqopt ( "" , "stage" , "stage number under test" , "N" )
69
70
. reqopt ( "" , "stage-id" , "the target-stage identifier" , "stageN-TARGET" )
@@ -157,7 +158,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
157
158
"" ,
158
159
"rustfix-coverage" ,
159
160
"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`",
161
162
)
162
163
. optflag ( "" , "force-rerun" , "rerun tests even if the inputs are unchanged" )
163
164
. optflag ( "" , "only-modified" , "only run tests that result been modified" )
@@ -309,6 +310,10 @@ pub fn parse_config(args: Vec<String>) -> Config {
309
310
src_test_suite_root. display( )
310
311
) ;
311
312
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
+
312
317
Config {
313
318
bless : matches. opt_present ( "bless" ) ,
314
319
compile_lib_path : make_absolute ( opt_path ( matches, "compile-lib-path" ) ) ,
@@ -327,7 +332,9 @@ pub fn parse_config(args: Vec<String>) -> Config {
327
332
src_root,
328
333
src_test_suite_root,
329
334
330
- build_base : opt_path ( matches, "build-base" ) ,
335
+ build_root,
336
+ build_test_suite_root,
337
+
331
338
sysroot_base : opt_path ( matches, "sysroot-base" ) ,
332
339
333
340
stage,
@@ -438,7 +445,11 @@ pub fn log_config(config: &Config) {
438
445
logv ( c, format ! ( "src_root: {}" , config. src_root. display( ) ) ) ;
439
446
logv ( c, format ! ( "src_test_suite_root: {}" , config. src_test_suite_root. display( ) ) ) ;
440
447
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
+
442
453
logv ( c, format ! ( "stage: {}" , config. stage) ) ;
443
454
logv ( c, format ! ( "stage_id: {}" , config. stage_id) ) ;
444
455
logv ( c, format ! ( "mode: {}" , config. mode) ) ;
@@ -488,7 +499,7 @@ pub fn run_tests(config: Arc<Config>) {
488
499
// we first make sure that the coverage file does not exist.
489
500
// It will be created later on.
490
501
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 ( ) ;
492
503
coverage_file_path. push ( "rustfix_missing_coverage.txt" ) ;
493
504
if coverage_file_path. exists ( ) {
494
505
if let Err ( e) = fs:: remove_file ( & coverage_file_path) {
0 commit comments