File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
tests/run-make/rustdoc-test-builder Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ fn main() {
2323 // ... and that we didn't panic.
2424 output. assert_not_ice ( ) ;
2525
26+ // Some cross targets (e.g. wasm) cannot execute doctests directly even with a runner,
27+ // so only exercise the success path when building for the host.
28+ let host = std:: env:: var ( "HOST" ) . expect ( "HOST must be set" ) ;
29+ let target = std:: env:: var ( "TARGET" ) . expect ( "TARGET must be set" ) ;
30+ if host != target {
31+ return ;
32+ }
33+
2634 // Test 2: Verify that a valid test-builder is invoked with correct arguments
2735 // Build a custom test-builder that logs its arguments and forwards to rustc.
2836 // Use `bare_rustc` so we compile for the host architecture even in cross builds.
You can’t perform that action at this time.
0 commit comments