Skip to content

Commit 5540976

Browse files
committed
Rename stamp to stamp_file_path
1 parent 3f8d87b commit 5540976

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎src/tools/compiletest/src/lib.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ fn make_test(cx: &TestCollectorCx, collector: &mut TestCollector, testpaths: &Te
837837

838838
/// The path of the `stamp` file that gets created or updated whenever a
839839
/// particular test completes successfully.
840-
fnstamp(config:&Config,testpaths:&TestPaths,revision:Option<&str>) -> PathBuf{
840+
fnstamp_file_path(config:&Config,testpaths:&TestPaths,revision:Option<&str>) -> PathBuf{
841841
output_base_dir(config, testpaths, revision).join("stamp")
842842
}
843843

@@ -891,9 +891,9 @@ fn is_up_to_date(
891891
props:&EarlyProps,
892892
revision:Option<&str>,
893893
) -> bool{
894-
letstamp_name = stamp(&cx.config, testpaths, revision);
894+
letstamp_file_path = stamp_file_path(&cx.config, testpaths, revision);
895895
// Check the config hash inside the stamp file.
896-
let contents = match fs::read_to_string(&stamp_name){
896+
let contents = match fs::read_to_string(&stamp_file_path){
897897
Ok(f) => f,
898898
Err(ref e)if e.kind() == ErrorKind::InvalidData => panic!("Can't read stamp contents"),
899899
// The test hasn't succeeded yet, so it is not up-to-date.
@@ -915,7 +915,7 @@ fn is_up_to_date(
915915

916916
// If no relevant files have been modified since the stamp file was last
917917
// written, the test is up-to-date.
918-
inputs_stamp < Stamp::from_path(&stamp_name)
918+
inputs_stamp < Stamp::from_path(&stamp_file_path)
919919
}
920920

921921
/// The maximum of a set of file-modified timestamps.

‎src/tools/compiletest/src/runtest.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::errors::{self, Error, ErrorKind};
2929
usecrate::header::TestProps;
3030
usecrate::read2::{Truncated, read2_abbreviated};
3131
usecrate::util::{PathBufExt, add_dylib_path, logv, static_regex};
32-
usecrate::{ColorConfig, json};
32+
usecrate::{ColorConfig, json, stamp_file_path};
3333

3434
mod debugger;
3535

@@ -2595,8 +2595,8 @@ impl<'test> TestCx<'test> {
25952595
}
25962596

25972597
fncreate_stamp(&self){
2598-
letstamp = crate::stamp(&self.config,self.testpaths,self.revision);
2599-
fs::write(&stamp,compute_stamp_hash(&self.config)).unwrap();
2598+
letstamp_file_path = stamp_file_path(&self.config,self.testpaths,self.revision);
2599+
fs::write(&stamp_file_path,compute_stamp_hash(&self.config)).unwrap();
26002600
}
26012601

26022602
fninit_incremental_test(&self){

0 commit comments

Comments
 (0)