@@ -211,7 +211,6 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
211
211
props : & props,
212
212
testpaths,
213
213
revision : revision,
214
- is_aux : false ,
215
214
} ;
216
215
create_dir_all ( & cx. output_base_dir ( ) ) . unwrap ( ) ;
217
216
@@ -230,7 +229,6 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
230
229
props : & revision_props,
231
230
testpaths,
232
231
revision : Some ( revision) ,
233
- is_aux : false ,
234
232
} ;
235
233
rev_cx. run_revision ( ) ;
236
234
}
@@ -262,7 +260,7 @@ pub fn compute_stamp_hash(config: &Config) -> String {
262
260
env:: var_os ( "PYTHONPATH" ) . hash ( & mut hash) ;
263
261
}
264
262
265
- if let Ui | RunPass = config. mode {
263
+ if let Ui | RunPass | Incremental = config. mode {
266
264
config. force_pass_mode . hash ( & mut hash) ;
267
265
}
268
266
@@ -274,7 +272,6 @@ struct TestCx<'test> {
274
272
props : & ' test TestProps ,
275
273
testpaths : & ' test TestPaths ,
276
274
revision : Option < & ' test str > ,
277
- is_aux : bool ,
278
275
}
279
276
280
277
struct DebuggerCommands {
@@ -316,18 +313,13 @@ impl<'test> TestCx<'test> {
316
313
}
317
314
}
318
315
319
- fn effective_pass_mode ( & self ) -> Option < PassMode > {
320
- if !self . props . ignore_pass {
321
- if let ( mode @ Some ( _) , Some ( _) ) = ( self . config . force_pass_mode , self . props . pass_mode ) {
322
- return mode;
323
- }
324
- }
325
- self . props . pass_mode
316
+ fn pass_mode ( & self ) -> Option < PassMode > {
317
+ self . props . pass_mode ( self . config )
326
318
}
327
319
328
320
fn should_run_successfully ( & self ) -> bool {
329
321
match self . config . mode {
330
- RunPass | Ui => self . effective_pass_mode ( ) == Some ( PassMode :: Run ) ,
322
+ RunPass | Ui => self . pass_mode ( ) == Some ( PassMode :: Run ) ,
331
323
mode => panic ! ( "unimplemented for mode {:?}" , mode) ,
332
324
}
333
325
}
@@ -337,15 +329,15 @@ impl<'test> TestCx<'test> {
337
329
CompileFail => false ,
338
330
RunPass => true ,
339
331
JsDocTest => true ,
340
- Ui => self . props . pass_mode . is_some ( ) ,
332
+ Ui => self . pass_mode ( ) . is_some ( ) ,
341
333
Incremental => {
342
334
let revision = self . revision
343
335
. expect ( "incremental tests require a list of revisions" ) ;
344
336
if revision. starts_with ( "rpass" ) || revision. starts_with ( "rfail" ) {
345
337
true
346
338
} else if revision. starts_with ( "cfail" ) {
347
339
// FIXME: would be nice if incremental revs could start with "cpass"
348
- self . props . pass_mode . is_some ( )
340
+ self . pass_mode ( ) . is_some ( )
349
341
} else {
350
342
panic ! ( "revision name must begin with rpass, rfail, or cfail" ) ;
351
343
}
@@ -1356,7 +1348,7 @@ impl<'test> TestCx<'test> {
1356
1348
fn check_error_patterns ( & self , output_to_check : & str , proc_res : & ProcRes ) {
1357
1349
debug ! ( "check_error_patterns" ) ;
1358
1350
if self . props . error_patterns . is_empty ( ) {
1359
- if self . props . pass_mode . is_some ( ) {
1351
+ if self . pass_mode ( ) . is_some ( ) {
1360
1352
return ;
1361
1353
} else {
1362
1354
self . fatal ( & format ! (
@@ -1578,7 +1570,6 @@ impl<'test> TestCx<'test> {
1578
1570
props : & aux_props,
1579
1571
testpaths : & aux_testpaths,
1580
1572
revision : self . revision ,
1581
- is_aux : true ,
1582
1573
} ;
1583
1574
// Create the directory for the stdout/stderr files.
1584
1575
create_dir_all ( aux_cx. output_base_dir ( ) ) . unwrap ( ) ;
@@ -1748,7 +1739,6 @@ impl<'test> TestCx<'test> {
1748
1739
props : & aux_props,
1749
1740
testpaths : & aux_testpaths,
1750
1741
revision : self . revision ,
1751
- is_aux : true ,
1752
1742
} ;
1753
1743
// Create the directory for the stdout/stderr files.
1754
1744
create_dir_all ( aux_cx. output_base_dir ( ) ) . unwrap ( ) ;
@@ -1989,8 +1979,7 @@ impl<'test> TestCx<'test> {
1989
1979
}
1990
1980
}
1991
1981
1992
- let pass_mode = if self . is_aux { self . props . pass_mode } else { self . effective_pass_mode ( ) } ;
1993
- if let Some ( PassMode :: Check ) = pass_mode {
1982
+ if let Some ( PassMode :: Check ) = self . pass_mode ( ) {
1994
1983
rustc. args ( & [ "--emit" , "metadata" ] ) ;
1995
1984
}
1996
1985
@@ -2728,7 +2717,6 @@ impl<'test> TestCx<'test> {
2728
2717
props : & revision_props,
2729
2718
testpaths : self . testpaths ,
2730
2719
revision : self . revision ,
2731
- is_aux : false ,
2732
2720
} ;
2733
2721
2734
2722
if self . config . verbose {
0 commit comments