Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run doctests with cargo test #2

Open
rfwatson opened this issue Sep 16, 2020 · 0 comments
Open

Cannot run doctests with cargo test #2

rfwatson opened this issue Sep 16, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@rfwatson
Copy link
Owner

Running cargo test with a wasm target:

cargo test --target wasm32-unknown-unknown

... does not run the doctests at all. This should be fixable with unstable feature:

cargo test --target wasm32-unknown-unknown -Zdoctest-xcompile

but it results in an error:

   Compiling weblog v0.2.0 (/home/rob/dev/weblog)
    Finished test [unoptimized + debuginfo] target(s) in 0.07s
   Doc-tests weblog

running 4 tests
test src/lib.rs - (line 23) ... FAILED
test src/lib.rs - (line 15) ... FAILED
test src/lib.rs - (line 31) ... FAILED
test src/lib.rs - (line 41) ... FAILED

failures:

---- src/lib.rs - (line 23) stdout ----
Test executable failed (exit code 126).

stderr:
/tmp/rustdoctestrcp9CA/rust_out: /tmp/rustdoctestrcp9CA/rust_out: cannot execute binary file


---- src/lib.rs - (line 15) stdout ----
Test executable failed (exit code 126).

stderr:
/tmp/rustdoctesteKqwSz/rust_out: /tmp/rustdoctesteKqwSz/rust_out: cannot execute binary file


---- src/lib.rs - (line 31) stdout ----
Test executable failed (exit code 126).

stderr:
/tmp/rustdoctest1vEO6e/rust_out: /tmp/rustdoctest1vEO6e/rust_out: cannot execute binary file


---- src/lib.rs - (line 41) stdout ----
Test executable failed (exit code 126).

stderr:
/tmp/rustdoctestjrqw3o/rust_out: /tmp/rustdoctestjrqw3o/rust_out: cannot execute binary file



failures:
    src/lib.rs - (line 15)
    src/lib.rs - (line 23)
    src/lib.rs - (line 31)
@rfwatson rfwatson added the bug Something isn't working label Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant