Skip to content

Commit 700165d

Browse files
committed
Auto merge of #50468 - nrc:test-rustfmt, r=alexcrichton
Pass a test directory to rustfmt Another attempt to fix the rustfmt tests. `RUSTFMT_TEST_DIR` is consumed by Rustfmt in the latext commit (thus the Rustfmt update) because we need a place to create temp files that won't be read-only. r? @alexcrichton
2 parents 428ea5f + df97dd1 commit 700165d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/bootstrap/test.rs

+3
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,9 @@ impl Step for Rustfmt {
313313

314314
// Don't build tests dynamically, just a pain to work with
315315
cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
316+
let dir = testdir(builder, compiler.host);
317+
t!(fs::create_dir_all(&dir));
318+
cargo.env("RUSTFMT_TEST_DIR", dir);
316319

317320
builder.add_rustc_lib_path(compiler, &mut cargo);
318321

src/tools/rustfmt

0 commit comments

Comments
 (0)