forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add make tests for preserving test binaries
fix: rust-lang#88110
- Loading branch information
Patrick Conrad
committed
Aug 25, 2021
1 parent
4b45bb9
commit 785309b
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
include ../../run-make-fulldeps/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 | ||
|
||
run: | ||
mkdir -p $(TMPDIR)/doctests | ||
$(RUSTC) --crate-type rlib t.rs | ||
$(RUSTDOC) -Zunstable-options --test --persist-doctests $(TMPDIR)/doctests --extern t=$(TMPDIR)/libt.rlib t.rs | ||
$(TMPDIR)/doctests/t_rs_2_0/rust_out | ||
$(TMPDIR)/doctests/t_rs_8_0/rust_out | ||
rm -rf $(TMPDIR)/doctests | ||
|
||
no_run: | ||
mkdir -p $(TMPDIR)/doctests | ||
$(RUSTC) --crate-type rlib t.rs | ||
$(RUSTDOC) -Zunstable-options --test --persist-doctests $(TMPDIR)/doctests --extern t=$(TMPDIR)/libt.rlib t.rs --no-run | ||
$(TMPDIR)/doctests/t_rs_2_0/rust_out | ||
$(TMPDIR)/doctests/t_rs_8_0/rust_out | ||
rm -rf $(TMPDIR)/doctests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// Fungle the foople. | ||
/// ``` | ||
/// t::foople(); | ||
/// ``` | ||
pub fn foople() {} | ||
|
||
/// Flomble the florp | ||
/// ``` | ||
/// t::florp(); | ||
/// ``` | ||
pub fn florp() {} |