Skip to content

Commit

Permalink
Fix incremental-session-fail to work when run as root.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed May 29, 2021
1 parent e7411a2 commit 4c550bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/test/run-make/incremental-session-fail/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
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)
Expand Down

0 comments on commit 4c550bc

Please sign in to comment.