@@ -130,6 +130,15 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
130130 }
131131 debug ! ( "running {:?}" , testpaths. file. display( ) ) ;
132132 let mut props = TestProps :: from_file ( & testpaths. file , revision, & config) ;
133+
134+ // Currently, incremental is soft disabled unless this environment
135+ // variable is set. A bunch of our tests assume it's enabled, though - so
136+ // just enable it for our tests.
137+ //
138+ // This is deemed preferable to ignoring those tests; we still want to test
139+ // incremental somewhat, as users can opt in to it.
140+ props. rustc_env . push ( ( String :: from ( "RUSTC_FORCE_INCREMENTAL" ) , String :: from ( "1" ) ) ) ;
141+
133142 if props. incremental {
134143 props. incremental_dir = Some ( incremental_dir ( & config, testpaths) ) ;
135144 }
@@ -146,6 +155,12 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
146155 assert ! ( !props. revisions. is_empty( ) , "Incremental tests require revisions." ) ;
147156 for revision in & props. revisions {
148157 let mut revision_props = TestProps :: from_file ( & testpaths. file , Some ( revision) , & config) ;
158+
159+ // See above - need to enable it explicitly for now.
160+ revision_props
161+ . rustc_env
162+ . push ( ( String :: from ( "RUSTC_FORCE_INCREMENTAL" ) , String :: from ( "1" ) ) ) ;
163+
149164 revision_props. incremental_dir = props. incremental_dir . clone ( ) ;
150165 let rev_cx = TestCx {
151166 config : & config,
@@ -1630,7 +1645,17 @@ impl<'test> TestCx<'test> {
16301645 /// Returns whether or not it is a dylib.
16311646 fn build_auxiliary ( & self , source_path : & str , aux_dir : & Path ) -> bool {
16321647 let aux_testpaths = self . compute_aux_test_paths ( source_path) ;
1633- let aux_props = self . props . from_aux_file ( & aux_testpaths. file , self . revision , self . config ) ;
1648+ let mut aux_props =
1649+ self . props . from_aux_file ( & aux_testpaths. file , self . revision , self . config ) ;
1650+
1651+ // Currently, incremental is soft disabled unless this environment
1652+ // variable is set. A bunch of our tests assume it's enabled, though - so
1653+ // just enable it for our tests.
1654+ //
1655+ // This is deemed preferable to ignoring those tests; we still want to test
1656+ // incremental somewhat, as users can opt in to it.
1657+ aux_props. rustc_env . push ( ( String :: from ( "RUSTC_FORCE_INCREMENTAL" ) , String :: from ( "1" ) ) ) ;
1658+
16341659 let aux_output = TargetLocation :: ThisDirectory ( self . aux_output_dir_name ( ) ) ;
16351660 let aux_cx = TestCx {
16361661 config : self . config ,
0 commit comments