Rename stamp
to stamp_file_path
This commit is contained in:
parent
3f8d87beda
commit
554097678a
@ -837,7 +837,7 @@ fn make_test(cx: &TestCollectorCx, collector: &mut TestCollector, testpaths: &Te
|
|||||||
|
|
||||||
/// The path of the `stamp` file that gets created or updated whenever a
|
/// The path of the `stamp` file that gets created or updated whenever a
|
||||||
/// particular test completes successfully.
|
/// particular test completes successfully.
|
||||||
fn stamp(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
|
fn stamp_file_path(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
|
||||||
output_base_dir(config, testpaths, revision).join("stamp")
|
output_base_dir(config, testpaths, revision).join("stamp")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -891,9 +891,9 @@ fn is_up_to_date(
|
|||||||
props: &EarlyProps,
|
props: &EarlyProps,
|
||||||
revision: Option<&str>,
|
revision: Option<&str>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let stamp_name = stamp(&cx.config, testpaths, revision);
|
let stamp_file_path = stamp_file_path(&cx.config, testpaths, revision);
|
||||||
// Check the config hash inside the stamp file.
|
// Check the config hash inside the stamp file.
|
||||||
let contents = match fs::read_to_string(&stamp_name) {
|
let contents = match fs::read_to_string(&stamp_file_path) {
|
||||||
Ok(f) => f,
|
Ok(f) => f,
|
||||||
Err(ref e) if e.kind() == ErrorKind::InvalidData => panic!("Can't read stamp contents"),
|
Err(ref e) if e.kind() == ErrorKind::InvalidData => panic!("Can't read stamp contents"),
|
||||||
// The test hasn't succeeded yet, so it is not up-to-date.
|
// The test hasn't succeeded yet, so it is not up-to-date.
|
||||||
@ -915,7 +915,7 @@ fn is_up_to_date(
|
|||||||
|
|
||||||
// If no relevant files have been modified since the stamp file was last
|
// If no relevant files have been modified since the stamp file was last
|
||||||
// written, the test is up-to-date.
|
// written, the test is up-to-date.
|
||||||
inputs_stamp < Stamp::from_path(&stamp_name)
|
inputs_stamp < Stamp::from_path(&stamp_file_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The maximum of a set of file-modified timestamps.
|
/// The maximum of a set of file-modified timestamps.
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
use crate::header::TestProps;
|
use crate::header::TestProps;
|
||||||
use crate::read2::{Truncated, read2_abbreviated};
|
use crate::read2::{Truncated, read2_abbreviated};
|
||||||
use crate::util::{PathBufExt, add_dylib_path, logv, static_regex};
|
use crate::util::{PathBufExt, add_dylib_path, logv, static_regex};
|
||||||
use crate::{ColorConfig, json};
|
use crate::{ColorConfig, json, stamp_file_path};
|
||||||
|
|
||||||
mod debugger;
|
mod debugger;
|
||||||
|
|
||||||
@ -2595,8 +2595,8 @@ fn check_and_prune_duplicate_outputs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn create_stamp(&self) {
|
fn create_stamp(&self) {
|
||||||
let stamp = crate::stamp(&self.config, self.testpaths, self.revision);
|
let stamp_file_path = stamp_file_path(&self.config, self.testpaths, self.revision);
|
||||||
fs::write(&stamp, compute_stamp_hash(&self.config)).unwrap();
|
fs::write(&stamp_file_path, compute_stamp_hash(&self.config)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init_incremental_test(&self) {
|
fn init_incremental_test(&self) {
|
||||||
|
Loading…
Reference in New Issue
Block a user