Skip to content

Commit 08c01f8

Browse files
committed
Fix flaky test
Rustdoc writes to a pipe, and if the program on the other side has exited, it will exit with SIGPIPE. To avoid that happening, call `rustc` instead of `true`, which will wait to exit until it sees EOF on stdin. - Use a run-make-fulldeps test so that rustc is available in CI This is not exactly right, because the test shouldn't require building rustc twice, but it avoids having to build rustdoc for run-make tests.
1 parent 1f0fc02 commit 08c01f8

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-include ../../run-make-fulldeps/tools.mk
2+
3+
# How to manually run this
4+
# $ ./x.py test src/test/run-make/rustdoc-test-builder
5+
6+
all:
7+
# Rustc isn't available in UI tests because the only compiler available is the
8+
# one built from source, which isn't in PATH. This needs to be a run-make
9+
# test so rustc is available.
10+
$(RUSTDOC) --test -Z unstable-options --test-builder $(RUSTC_ORIGINAL) doctest.rs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/// ```no_run
2+
/// // This tests that `--test-builder` is accepted as a flag by rustdoc.
3+
/// ```
4+
pub struct Foo;

src/test/rustdoc/issue-80893.rs

-6
This file was deleted.

0 commit comments

Comments
 (0)