@@ -63,10 +63,6 @@ pub fn run(config: Config, testpaths: &TestPaths) {
63
63
for revision in & base_props. revisions {
64
64
let mut revision_props = base_props. clone ( ) ;
65
65
revision_props. load_from ( & testpaths. file , Some ( & revision) ) ;
66
- revision_props. compile_flags . extend ( vec ! [
67
- format!( "--cfg" ) ,
68
- format!( "{}" , revision) ,
69
- ] ) ;
70
66
let rev_cx = TestCx {
71
67
config : & config,
72
68
props : & revision_props,
@@ -383,6 +379,12 @@ actual:\n\
383
379
self . config. build_base. to_str( ) . unwrap( ) . to_owned( ) ,
384
380
"-L" . to_owned( ) ,
385
381
aux_dir. to_str( ) . unwrap( ) . to_owned( ) ) ;
382
+ if let Some ( revision) = self . revision {
383
+ args. extend ( vec ! [
384
+ format!( "--cfg" ) ,
385
+ format!( "{}" , revision) ,
386
+ ] ) ;
387
+ }
386
388
args. extend ( self . split_maybe_args ( & self . config . target_rustcflags ) ) ;
387
389
args. extend ( self . props . compile_flags . iter ( ) . cloned ( ) ) ;
388
390
// FIXME (#9639): This needs to handle non-utf8 paths
@@ -1102,7 +1104,7 @@ actual:\n\
1102
1104
if self . props . build_aux_docs {
1103
1105
for rel_ab in & self . props . aux_builds {
1104
1106
let aux_testpaths = self . compute_aux_test_paths ( rel_ab) ;
1105
- let aux_props = TestProps :: from_file ( & aux_testpaths. file ) ;
1107
+ let aux_props = self . props . from_aux_file ( & aux_testpaths. file , self . revision ) ;
1106
1108
let aux_cx = TestCx {
1107
1109
config : self . config ,
1108
1110
props : & aux_props,
@@ -1186,7 +1188,7 @@ actual:\n\
1186
1188
1187
1189
for rel_ab in & self . props . aux_builds {
1188
1190
let aux_testpaths = self . compute_aux_test_paths ( rel_ab) ;
1189
- let aux_props = TestProps :: from_file ( & aux_testpaths. file ) ;
1191
+ let aux_props = self . props . from_aux_file ( & aux_testpaths. file , self . revision ) ;
1190
1192
let mut crate_type = if aux_props. no_prefer_dynamic {
1191
1193
Vec :: new ( )
1192
1194
} else {
@@ -1291,6 +1293,21 @@ actual:\n\
1291
1293
self . config. build_base. to_str( ) . unwrap( ) . to_owned( ) ,
1292
1294
format!( "--target={}" , target) ) ;
1293
1295
1296
+ if let Some ( revision) = self . revision {
1297
+ args. extend ( vec ! [
1298
+ format!( "--cfg" ) ,
1299
+ format!( "{}" , revision) ,
1300
+ ] ) ;
1301
+ }
1302
+
1303
+ if let Some ( ref incremental_dir) = self . props . incremental_dir {
1304
+ args. extend ( vec ! [
1305
+ format!( "-Z" ) ,
1306
+ format!( "incremental={}" , incremental_dir. display( ) ) ,
1307
+ ] ) ;
1308
+ }
1309
+
1310
+
1294
1311
match self . config . mode {
1295
1312
CompileFail |
1296
1313
ParseFail |
@@ -1980,10 +1997,7 @@ actual:\n\
1980
1997
1981
1998
// Add an extra flag pointing at the incremental directory.
1982
1999
let mut revision_props = self . props . clone ( ) ;
1983
- revision_props. compile_flags . extend ( vec ! [
1984
- format!( "-Z" ) ,
1985
- format!( "incremental={}" , incremental_dir. display( ) ) ,
1986
- ] ) ;
2000
+ revision_props. incremental_dir = Some ( incremental_dir) ;
1987
2001
1988
2002
let revision_cx = TestCx {
1989
2003
config : self . config ,
0 commit comments