Skip to content

Commit 5540976

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

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/tools/compiletest/src/lib.rs

+4-4
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-
fn stamp(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
840+
fn stamp_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-
let stamp_name = stamp(&cx.config, testpaths, revision);
894+
let stamp_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

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

3434
mod debugger;
3535

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

25972597
fn create_stamp(&self) {
2598-
let stamp = crate::stamp(&self.config, self.testpaths, self.revision);
2599-
fs::write(&stamp, compute_stamp_hash(&self.config)).unwrap();
2598+
let stamp_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
fn init_incremental_test(&self) {

0 commit comments

Comments
 (0)