@@ -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" )
@@ -304,6 +305,10 @@ pub fn parse_config(args: Vec<String>) -> Config {
304
305
let src_test_suite_root = opt_path ( matches, "src-test-suite-root" ) ;
305
306
assert ! ( src_test_suite_root. starts_with( & src_root) ) ;
306
307
308
+ let build_root = opt_path ( matches, "build-root" ) ;
309
+ let build_test_suite_root = opt_path ( matches, "build-test-suite-root" ) ;
310
+ assert ! ( build_test_suite_root. starts_with( & build_root) ) ;
311
+
307
312
Config {
308
313
bless : matches. opt_present ( "bless" ) ,
309
314
compile_lib_path : make_absolute ( opt_path ( matches, "compile-lib-path" ) ) ,
@@ -322,7 +327,9 @@ pub fn parse_config(args: Vec<String>) -> Config {
322
327
src_root,
323
328
src_test_suite_root,
324
329
325
- build_base : opt_path ( matches, "build-base" ) ,
330
+ build_root,
331
+ build_test_suite_root,
332
+
326
333
sysroot_base : opt_path ( matches, "sysroot-base" ) ,
327
334
328
335
stage,
@@ -433,7 +440,11 @@ pub fn log_config(config: &Config) {
433
440
logv ( c, format ! ( "src_root: {}" , config. src_root. display( ) ) ) ;
434
441
logv ( c, format ! ( "src_test_suite_root: {}" , config. src_test_suite_root. display( ) ) ) ;
435
442
436
- logv ( c, format ! ( "build_base: {:?}" , config. build_base. display( ) ) ) ;
443
+ logv ( c, format ! ( "build_root: {}" , config. build_root. display( ) ) ) ;
444
+ logv ( c, format ! ( "build_test_suite_root: {}" , config. build_test_suite_root. display( ) ) ) ;
445
+
446
+ logv ( c, format ! ( "sysroot_base: {}" , config. sysroot_base. display( ) ) ) ;
447
+
437
448
logv ( c, format ! ( "stage: {}" , config. stage) ) ;
438
449
logv ( c, format ! ( "stage_id: {}" , config. stage_id) ) ;
439
450
logv ( c, format ! ( "mode: {}" , config. mode) ) ;
@@ -483,7 +494,7 @@ pub fn run_tests(config: Arc<Config>) {
483
494
// we first make sure that the coverage file does not exist.
484
495
// It will be created later on.
485
496
if config. rustfix_coverage {
486
- let mut coverage_file_path = config. build_base . clone ( ) ;
497
+ let mut coverage_file_path = config. build_test_suite_root . clone ( ) ;
487
498
coverage_file_path. push ( "rustfix_missing_coverage.txt" ) ;
488
499
if coverage_file_path. exists ( ) {
489
500
if let Err ( e) = fs:: remove_file ( & coverage_file_path) {
0 commit comments