Skip to content

Commit

Permalink
file_stem and comment per notriddle
Browse files Browse the repository at this point in the history
  • Loading branch information
EtomicBomb committed Jul 25, 2024
1 parent e3d2d9b commit 6516b64
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,8 @@ impl<'test> TestCx<'test> {
};
// Create the directory for the stdout/stderr files.
create_dir_all(aux_cx.output_base_dir()).unwrap();
// use root_testpaths here, because aux-builds should have the
// same --out-dir and auxiliary directory.
let auxres = aux_cx.document(&root_out_dir, root_testpaths);
if !auxres.status.success() {
return auxres;
Expand All @@ -1621,14 +1623,7 @@ impl<'test> TestCx<'test> {
// actual --out-dir given to the auxiliary or test, as opposed to the root out dir for the entire
// test
let out_dir: Cow<'_, Path> = if self.props.unique_doc_out_dir {
let file_name = self
.testpaths
.file
.file_name()
.expect("file name should not be empty")
.to_str()
.expect("file name utf8")
.trim_end_matches(".rs");
let file_name = self.testpaths.file.file_stem().expect("file name should not be empty");
let out_dir = PathBuf::from_iter([
root_out_dir,
Path::new("docs"),
Expand Down

0 comments on commit 6516b64

Please sign in to comment.