-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to check behavior when incremental session init fails.
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
include ../../run-make-fulldeps/tools.mk | ||
|
||
SESSION_DIR := $(TMPDIR)/session | ||
OUTPUT_FILE := $(TMPDIR)/build-output | ||
|
||
all: | ||
echo $(TMPDIR) | ||
mkdir $(SESSION_DIR) | ||
# Make it so that rustc will fail to create a session directory. | ||
chmod a-w $(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// intentionally empty |