summaryrefslogtreecommitdiffstats
path: root/tests/run-make/doctests-keep-binaries
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/doctests-keep-binaries')
-rw-r--r--tests/run-make/doctests-keep-binaries/Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/run-make/doctests-keep-binaries/Makefile b/tests/run-make/doctests-keep-binaries/Makefile
index 6254e93d3..2c647851a 100644
--- a/tests/run-make/doctests-keep-binaries/Makefile
+++ b/tests/run-make/doctests-keep-binaries/Makefile
@@ -3,7 +3,9 @@ include ../tools.mk
# Check that valid binaries are persisted by running them, regardless of whether the --run or --no-run option is used.
-all: run no_run
+MY_SRC_DIR := ${CURDIR}
+
+all: run no_run test_run_directory
run:
mkdir -p $(TMPDIR)/doctests
@@ -20,3 +22,12 @@ no_run:
$(TMPDIR)/doctests/t_rs_2_0/rust_out
$(TMPDIR)/doctests/t_rs_8_0/rust_out
rm -rf $(TMPDIR)/doctests
+
+# Behavior with --test-run-directory with relative paths.
+test_run_directory:
+ mkdir -p $(TMPDIR)/doctests
+ mkdir -p $(TMPDIR)/rundir
+ $(RUSTC) --crate-type rlib t.rs
+ ( cd $(TMPDIR); \
+ $(RUSTDOC) -Zunstable-options --test --persist-doctests doctests --test-run-directory rundir --extern t=libt.rlib $(MY_SRC_DIR)/t.rs )
+ rm -rf $(TMPDIR)/doctests $(TMPDIR)/rundir