@@ -547,7 +547,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
547
547
struct TestCollectorCx {
548
548
config : Arc < Config > ,
549
549
cache : HeadersCache ,
550
- inputs : Stamp ,
550
+ common_inputs_stamp : Stamp ,
551
551
modified_tests : Vec < PathBuf > ,
552
552
}
553
553
@@ -565,13 +565,13 @@ struct TestCollector {
565
565
/// because filtering is handled later by libtest.
566
566
pub fn collect_and_make_tests ( config : Arc < Config > ) -> Vec < test:: TestDescAndFn > {
567
567
debug ! ( "making tests from {:?}" , config. src_base. display( ) ) ;
568
- let inputs = common_inputs_stamp ( & config) ;
568
+ let common_inputs_stamp = common_inputs_stamp ( & config) ;
569
569
let modified_tests = modified_tests ( & config, & config. src_base ) . unwrap_or_else ( |err| {
570
570
panic ! ( "modified_tests got error from dir: {}, error: {}" , config. src_base. display( ) , err)
571
571
} ) ;
572
572
let cache = HeadersCache :: load ( & config) ;
573
573
574
- let cx = TestCollectorCx { config, cache, inputs , modified_tests } ;
574
+ let cx = TestCollectorCx { config, cache, common_inputs_stamp , modified_tests } ;
575
575
let mut collector =
576
576
TestCollector { tests : vec ! [ ] , found_paths : HashSet :: new ( ) , poisoned : false } ;
577
577
@@ -592,7 +592,13 @@ pub fn collect_and_make_tests(config: Arc<Config>) -> Vec<test::TestDescAndFn> {
592
592
tests
593
593
}
594
594
595
- /// Returns a stamp constructed from input files common to all test cases.
595
+ /// Returns the most recent last-modified timestamp from among the input files
596
+ /// that are considered relevant to all tests (e.g. the compiler, std, and
597
+ /// compiletest itself).
598
+ ///
599
+ /// (Some of these inputs aren't actually relevant to _all_ tests, but they are
600
+ /// common to some subset of tests, and are hopefully unlikely to be modified
601
+ /// while working on other tests.)
596
602
fn common_inputs_stamp ( config : & Config ) -> Stamp {
597
603
let rust_src_dir = config. find_rust_src_root ( ) . expect ( "Could not find Rust source root" ) ;
598
604
@@ -902,14 +908,14 @@ fn is_up_to_date(
902
908
903
909
// Check the timestamp of the stamp file against the last modified time
904
910
// of all files known to be relevant to the test.
905
- let mut inputs = cx. inputs . clone ( ) ;
911
+ let mut inputs_stamp = cx. common_inputs_stamp . clone ( ) ;
906
912
for path in files_related_to_test ( & cx. config , testpaths, props, revision) {
907
- inputs . add_path ( & path) ;
913
+ inputs_stamp . add_path ( & path) ;
908
914
}
909
915
910
916
// If no relevant files have been modified since the stamp file was last
911
917
// written, the test is up-to-date.
912
- inputs < Stamp :: from_path ( & stamp_name)
918
+ inputs_stamp < Stamp :: from_path ( & stamp_name)
913
919
}
914
920
915
921
/// The maximum of a set of file-modified timestamps.
0 commit comments