We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1aa0dd2 + 41ff588 commit 8d7a4c2Copy full SHA for 8d7a4c2
tests/run-make/rustdoc-tempdir-removal/rmake.rs
@@ -1,14 +1,22 @@
1
// This test ensures that no temporary folder is "left behind" when doctests fail for any reason.
2
3
-//@ only-linux
+//@ ignore-cross-compile
4
5
use std::path::Path;
6
7
use run_make_support::{path, rfs, rustdoc};
8
9
fn run_doctest_and_check_tmpdir(tmp_dir: &Path, doctest: &str, edition: &str) {
10
- let output =
11
- rustdoc().input(doctest).env("TMPDIR", tmp_dir).arg("--test").edition(edition).run_fail();
+ let mut runner = rustdoc();
+ runner.input(doctest).arg("--test").edition(edition);
12
+ let output = if cfg!(unix) {
13
+ runner.env("TMPDIR", tmp_dir)
14
+ } else if cfg!(windows) {
15
+ runner.env("TEMP", tmp_dir).env("TMP", tmp_dir)
16
+ } else {
17
+ panic!("unsupported OS")
18
+ }
19
+ .run_fail();
20
21
output.assert_exit_code(101).assert_stdout_contains(
22
"test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out",
0 commit comments