@@ -144,6 +144,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
144
144
"enable this to generate a Rustfix coverage file, which is saved in \
145
145
`./<build_base>/rustfix_missing_coverage.txt`",
146
146
)
147
+ . optflag ( "" , "force-rerun" , "rerun tests even if the inputs are unchanged" )
147
148
. optflag ( "h" , "help" , "show this message" )
148
149
. reqopt ( "" , "channel" , "current Rust channel" , "CHANNEL" ) ;
149
150
@@ -289,6 +290,8 @@ pub fn parse_config(args: Vec<String>) -> Config {
289
290
llvm_components : matches. opt_str ( "llvm-components" ) . unwrap ( ) ,
290
291
nodejs : matches. opt_str ( "nodejs" ) ,
291
292
npm : matches. opt_str ( "npm" ) ,
293
+
294
+ force_rerun : matches. opt_present ( "force-rerun" ) ,
292
295
}
293
296
}
294
297
@@ -644,13 +647,15 @@ fn make_test(config: &Config, testpaths: &TestPaths, inputs: &Stamp) -> Vec<test
644
647
let test_name = crate :: make_test_name ( config, testpaths, revision) ;
645
648
let mut desc = make_test_description ( config, test_name, & test_path, src_file, cfg) ;
646
649
// Ignore tests that already run and are up to date with respect to inputs.
647
- desc. ignore |= is_up_to_date (
648
- config,
649
- testpaths,
650
- & early_props,
651
- revision. map ( |s| s. as_str ( ) ) ,
652
- inputs,
653
- ) ;
650
+ if !config. force_rerun {
651
+ desc. ignore |= is_up_to_date (
652
+ config,
653
+ testpaths,
654
+ & early_props,
655
+ revision. map ( |s| s. as_str ( ) ) ,
656
+ inputs,
657
+ ) ;
658
+ }
654
659
test:: TestDescAndFn { desc, testfn : make_test_closure ( config, testpaths, revision) }
655
660
} )
656
661
. collect ( )
0 commit comments