"",
"rustfix-coverage",
"enable this to generate a Rustfix coverage file, which is saved in \
- `/tmp/rustfix_missing_coverage.txt`",
+ `/<build_base>/rustfix_missing_coverage.txt`",
);
}
"bench" => {
/// If true, this will generate a coverage file with UI test files that run `MachineApplicable`
/// diagnostics but are missing `run-rustfix` annotations. The generated coverage file is
- /// created in `/tmp/rustfix_missing_coverage.txt`
+ /// created in `/<build_base>/rustfix_missing_coverage.txt`
pub rustfix_coverage: bool,
// Configuration for various run-make tests frobbing things like C compilers
"",
"rustfix-coverage",
"enable this to generate a Rustfix coverage file, which is saved in \
- `/tmp/rustfix_missing_coverage.txt`",
+ `./<build_base>/rustfix_missing_coverage.txt`",
)
.optflag("h", "help", "show this message");
// we first make sure that the coverage file does not exist.
// It will be created later on.
if config.rustfix_coverage {
- let coverage_file_path = Path::new("/tmp/rustfix_missing_coverage.txt");
+ let mut coverage_file_path = config.build_base.clone();
+ coverage_file_path.push("rustfix_missing_coverage.txt");
if coverage_file_path.exists() {
- if let Err(e) = fs::remove_file(coverage_file_path) {
+ if let Err(e) = fs::remove_file(&coverage_file_path) {
panic!("Could not delete {} due to {}", coverage_file_path.display(), e)
}
}
if suggestions.len() > 0
&& !self.props.run_rustfix
&& !self.props.rustfix_only_machine_applicable {
- let coverage_file_path = Path::new("/tmp/rustfix_missing_coverage.txt");
+ let mut coverage_file_path = self.config.build_base.clone();
+ coverage_file_path.push("rustfix_missing_coverage.txt");
+ debug!("coverage_file_path: {}", coverage_file_path.display());
+
let mut file = OpenOptions::new()
.create(true)
.append(true)
- .open(coverage_file_path)
+ .open(coverage_file_path.as_path())
.expect("could not create or open file");
if let Err(_) = writeln!(file, "{}", self.testpaths.file.display()) {