]> git.proxmox.com Git - rustc.git/blame - src/test/run-make-fulldeps/rustdoc-io-error/Makefile
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / run-make-fulldeps / rustdoc-io-error / Makefile
CommitLineData
f2b60f7d 1include ../tools.mk
0731742a
XL
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
9fa01778
XL
7# ignore-windows
8# The test uses `chmod`.
0731742a 9
9fa01778 10OUTPUT_DIR := "$(TMPDIR)/rustdoc-io-error"
0731742a
XL
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.
15all:
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)