@@ -63,10 +63,6 @@ pub fn run(config: Config, testpaths: &TestPaths) {
6363 for revision in & base_props. revisions {
6464 let mut revision_props = base_props. clone ( ) ;
6565 revision_props. load_from ( & testpaths. file , Some ( & revision) ) ;
66- revision_props. compile_flags . extend ( vec ! [
67- format!( "--cfg" ) ,
68- format!( "{}" , revision) ,
69- ] ) ;
7066 let rev_cx = TestCx {
7167 config : & config,
7268 props : & revision_props,
@@ -383,6 +379,12 @@ actual:\n\
383379 self . config. build_base. to_str( ) . unwrap( ) . to_owned( ) ,
384380 "-L" . to_owned( ) ,
385381 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+ }
386388 args. extend ( self . split_maybe_args ( & self . config . target_rustcflags ) ) ;
387389 args. extend ( self . props . compile_flags . iter ( ) . cloned ( ) ) ;
388390 // FIXME (#9639): This needs to handle non-utf8 paths
@@ -1102,7 +1104,7 @@ actual:\n\
11021104 if self . props . build_aux_docs {
11031105 for rel_ab in & self . props . aux_builds {
11041106 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 ) ;
11061108 let aux_cx = TestCx {
11071109 config : self . config ,
11081110 props : & aux_props,
@@ -1186,7 +1188,7 @@ actual:\n\
11861188
11871189 for rel_ab in & self . props . aux_builds {
11881190 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 ) ;
11901192 let mut crate_type = if aux_props. no_prefer_dynamic {
11911193 Vec :: new ( )
11921194 } else {
@@ -1291,6 +1293,21 @@ actual:\n\
12911293 self . config. build_base. to_str( ) . unwrap( ) . to_owned( ) ,
12921294 format!( "--target={}" , target) ) ;
12931295
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+
12941311 match self . config . mode {
12951312 CompileFail |
12961313 ParseFail |
@@ -1980,10 +1997,7 @@ actual:\n\
19801997
19811998 // Add an extra flag pointing at the incremental directory.
19821999 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) ;
19872001
19882002 let revision_cx = TestCx {
19892003 config : self . config ,
0 commit comments