summaryrefslogtreecommitdiffstats
path: root/tests/run-make/incremental-session-fail/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/run-make/incremental-session-fail/Makefile
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/incremental-session-fail/Makefile')
-rw-r--r--tests/run-make/incremental-session-fail/Makefile14
1 files changed, 14 insertions, 0 deletions
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)