@@ -144,6 +144,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
144144 "enable this to generate a Rustfix coverage file, which is saved in \
145145 `./<build_base>/rustfix_missing_coverage.txt`",
146146 )
147+ . optflag ( "" , "force-rerun" , "rerun tests even if the inputs are unchanged" )
147148 . optflag ( "h" , "help" , "show this message" )
148149 . reqopt ( "" , "channel" , "current Rust channel" , "CHANNEL" ) ;
149150
@@ -289,6 +290,8 @@ pub fn parse_config(args: Vec<String>) -> Config {
289290 llvm_components : matches. opt_str ( "llvm-components" ) . unwrap ( ) ,
290291 nodejs : matches. opt_str ( "nodejs" ) ,
291292 npm : matches. opt_str ( "npm" ) ,
293+
294+ force_rerun : matches. opt_present ( "force-rerun" ) ,
292295 }
293296}
294297
@@ -644,13 +647,15 @@ fn make_test(config: &Config, testpaths: &TestPaths, inputs: &Stamp) -> Vec<test
644647 let test_name = crate :: make_test_name ( config, testpaths, revision) ;
645648 let mut desc = make_test_description ( config, test_name, & test_path, src_file, cfg) ;
646649 // 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+ }
654659 test:: TestDescAndFn { desc, testfn : make_test_closure ( config, testpaths, revision) }
655660 } )
656661 . collect ( )
0 commit comments