diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 6b3533c25785..cc959fa24a6d 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -28,7 +28,6 @@ run-make/incr-add-rust-src-component/Makefile run-make/incr-foreign-head-span/Makefile run-make/interdependent-c-libraries/Makefile run-make/issue-107094/Makefile -run-make/issue-14698/Makefile run-make/issue-15460/Makefile run-make/issue-33329/Makefile run-make/issue-35164/Makefile diff --git a/tests/run-make/issue-14698/foo.rs b/tests/run-make/invalid-tmpdir-env-var/foo.rs similarity index 100% rename from tests/run-make/issue-14698/foo.rs rename to tests/run-make/invalid-tmpdir-env-var/foo.rs diff --git a/tests/run-make/invalid-tmpdir-env-var/rmake.rs b/tests/run-make/invalid-tmpdir-env-var/rmake.rs new file mode 100644 index 000000000000..d4258775a11d --- /dev/null +++ b/tests/run-make/invalid-tmpdir-env-var/rmake.rs @@ -0,0 +1,18 @@ +// When the TMP or TMPDIR variable is set to an invalid or non-existing directory, +// this used to cause an internal compiler error (ICE). After the addition of proper +// error handling in #28430, this test checks that the expected message is printed. +// See https://github.com/rust-lang/rust/issues/14698 + +use run_make_support::rustc; + +// NOTE: This is not a UI test despite its simplicity, as the error message contains a path +// with some variability that is difficult to normalize + +fn main() { + rustc() + .input("foo.rs") + .env("TMP", "fake") + .env("TMPDIR", "fake") + .run_fail() + .assert_stderr_contains("couldn't create a temp dir"); +} diff --git a/tests/run-make/issue-14698/Makefile b/tests/run-make/issue-14698/Makefile deleted file mode 100644 index a1cfb5abab54..000000000000 --- a/tests/run-make/issue-14698/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include ../tools.mk - -all: - TMP=fake TMPDIR=fake $(RUSTC) foo.rs 2>&1 | $(CGREP) "couldn't create a temp dir:"