Skip to content

Commit f2443a9

Browse files
committed
Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs
This UI test is sensitive to backtrace output, so it should make sure that backtraces are not enabled by the environment.
1 parent f99911a commit f2443a9

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/test/rustdoc-ui/failed-doctest-output.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// compile-flags:--test
1616
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
1717
// failure-status: 101
18+
// rustc-env:RUST_BACKTRACE=0
1819

1920
// doctest fails at runtime
2021
/// ```
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11

22
running 2 tests
3-
test $DIR/failed-doctest-output.rs - OtherStruct (line 26) ... FAILED
4-
test $DIR/failed-doctest-output.rs - SomeStruct (line 20) ... FAILED
3+
test $DIR/failed-doctest-output.rs - OtherStruct (line 27) ... FAILED
4+
test $DIR/failed-doctest-output.rs - SomeStruct (line 21) ... FAILED
55

66
failures:
77

8-
---- $DIR/failed-doctest-output.rs - OtherStruct (line 26) stdout ----
8+
---- $DIR/failed-doctest-output.rs - OtherStruct (line 27) stdout ----
99
error[E0425]: cannot find value `no` in this scope
10-
--> $DIR/failed-doctest-output.rs:27:1
10+
--> $DIR/failed-doctest-output.rs:28:1
1111
|
1212
3 | no
1313
| ^^ not found in this scope
1414

15-
thread '$DIR/failed-doctest-output.rs - OtherStruct (line 26)' panicked at 'couldn't compile the test', librustdoc/test.rs:332:13
15+
thread '$DIR/failed-doctest-output.rs - OtherStruct (line 27)' panicked at 'couldn't compile the test', librustdoc/test.rs:332:13
1616
note: Run with `RUST_BACKTRACE=1` for a backtrace.
1717

18-
---- $DIR/failed-doctest-output.rs - SomeStruct (line 20) stdout ----
19-
thread '$DIR/failed-doctest-output.rs - SomeStruct (line 20)' panicked at 'test executable failed:
18+
---- $DIR/failed-doctest-output.rs - SomeStruct (line 21) stdout ----
19+
thread '$DIR/failed-doctest-output.rs - SomeStruct (line 21)' panicked at 'test executable failed:
2020

2121
thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:3:1
2222
note: Run with `RUST_BACKTRACE=1` for a backtrace.
@@ -25,8 +25,8 @@ note: Run with `RUST_BACKTRACE=1` for a backtrace.
2525

2626

2727
failures:
28-
$DIR/failed-doctest-output.rs - OtherStruct (line 26)
29-
$DIR/failed-doctest-output.rs - SomeStruct (line 20)
28+
$DIR/failed-doctest-output.rs - OtherStruct (line 27)
29+
$DIR/failed-doctest-output.rs - SomeStruct (line 21)
3030

3131
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
3232

0 commit comments

Comments
 (0)