3 # This test verifies that rustdoc doesn't ICE when it encounters an IO error
4 # while generating files. Ideally this would be a rustdoc-ui test, so we could
5 # verify the error message as well.
8 # The test uses `chmod`.
10 OUTPUT_DIR := "$(TMPDIR)/rustdoc-io-error"
12 # This test operates by creating a temporary directory and modifying its
13 # permissions so that it is not writable. We have to take special care to set
14 # the permissions back to normal so that it's able to be deleted later.
16 mkdir -p $(OUTPUT_DIR)
17 chmod u-w $(OUTPUT_DIR)
18 -$(shell $(RUSTDOC) -o $(OUTPUT_DIR) foo.rs)
19 chmod u+w $(OUTPUT_DIR)
20 exit $($(.SHELLSTATUS) -eq 1)