Skip to content

Commit 1c1923f

Browse files
committed
tests: skip rustdoc test-builder success path when cross-compiling
Signed-off-by: Osama Abdelkader <[email protected]>
1 parent 09385f9 commit 1c1923f

File tree

1 file changed

+7
-0
lines changed
  • tests/run-make/rustdoc-test-builder

1 file changed

+7
-0
lines changed

tests/run-make/rustdoc-test-builder/rmake.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ fn main() {
2323
// ... and that we didn't panic.
2424
output.assert_not_ice();
2525

26+
// Some targets (for example wasm) cannot execute doctests directly even with a runner,
27+
// so only exercise the success path when the target can run on the host.
28+
let target = std::env::var("TARGET").expect("TARGET must be set");
29+
if target.contains("wasm") {
30+
return;
31+
}
32+
2633
// Test 2: Verify that a valid test-builder is invoked with correct arguments
2734
// Build a custom test-builder that logs its arguments and forwards to rustc.
2835
// Use `bare_rustc` so we compile for the host architecture even in cross builds.

0 commit comments

Comments
 (0)