@@ -130,6 +130,15 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
130
130
}
131
131
debug ! ( "running {:?}" , testpaths. file. display( ) ) ;
132
132
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
+
133
142
if props. incremental {
134
143
props. incremental_dir = Some ( incremental_dir ( & config, testpaths) ) ;
135
144
}
@@ -146,6 +155,12 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
146
155
assert ! ( !props. revisions. is_empty( ) , "Incremental tests require revisions." ) ;
147
156
for revision in & props. revisions {
148
157
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
+
149
164
revision_props. incremental_dir = props. incremental_dir . clone ( ) ;
150
165
let rev_cx = TestCx {
151
166
config : & config,
@@ -1630,7 +1645,17 @@ impl<'test> TestCx<'test> {
1630
1645
/// Returns whether or not it is a dylib.
1631
1646
fn build_auxiliary ( & self , source_path : & str , aux_dir : & Path ) -> bool {
1632
1647
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
+
1634
1659
let aux_output = TargetLocation :: ThisDirectory ( self . aux_output_dir_name ( ) ) ;
1635
1660
let aux_cx = TestCx {
1636
1661
config : self . config ,
0 commit comments