From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/run-make/incremental-session-fail/Makefile | 14 ++++++++++++++ tests/run-make/incremental-session-fail/foo.rs | 1 + 2 files changed, 15 insertions(+) create mode 100644 tests/run-make/incremental-session-fail/Makefile create mode 100644 tests/run-make/incremental-session-fail/foo.rs (limited to 'tests/run-make/incremental-session-fail') diff --git a/tests/run-make/incremental-session-fail/Makefile b/tests/run-make/incremental-session-fail/Makefile new file mode 100644 index 000000000..0461bb926 --- /dev/null +++ b/tests/run-make/incremental-session-fail/Makefile @@ -0,0 +1,14 @@ +include ../../run-make-fulldeps/tools.mk + +SESSION_DIR := $(TMPDIR)/session +OUTPUT_FILE := $(TMPDIR)/build-output + +all: + echo $(TMPDIR) + # Make it so that rustc will fail to create a session directory. + touch $(SESSION_DIR) + # Check exit code is 1 for an error, and not 101 for ICE. + $(RUSTC) foo.rs --crate-type=rlib -C incremental=$(SESSION_DIR) > $(OUTPUT_FILE) 2>&1; [ $$? -eq 1 ] + $(CGREP) "Could not create incremental compilation crate directory" < $(OUTPUT_FILE) + # -v tests are fragile, hopefully this text won't change + $(CGREP) -v "internal compiler error" < $(OUTPUT_FILE) diff --git a/tests/run-make/incremental-session-fail/foo.rs b/tests/run-make/incremental-session-fail/foo.rs new file mode 100644 index 000000000..d11c69f81 --- /dev/null +++ b/tests/run-make/incremental-session-fail/foo.rs @@ -0,0 +1 @@ +// intentionally empty -- cgit v1.2.3