]> git.lizzy.rs Git - rust.git/blob - tests/run-make-fulldeps/rustdoc-io-error/Makefile
Rollup merge of #107731 - RalfJung:interpret-discriminant, r=cjgillot
[rust.git] / tests / run-make-fulldeps / rustdoc-io-error / Makefile
1 include ../tools.mk
2
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.
6
7 # ignore-windows
8 # The test uses `chmod`.
9
10 OUTPUT_DIR := "$(TMPDIR)/rustdoc-io-error"
11
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.
15 all:
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)