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

Skip testing targets that don't ship libstd #556

Merged
merged 2 commits into from
Dec 2, 2018

Conversation

Nemo157
Copy link
Member

@Nemo157 Nemo157 commented Nov 30, 2018

When you have weirder targets like thumbv6m-none-eabi installed in your current toolchain then compiletest crashes because it doesn't know what os or architecture the target is:

> cargo test
[...]
## Running run-pass tests in tests/run-pass against miri for target thumbv6m-none-eabi
thread 'main' panicked at 'Cannot determine OS from triple', /Users/nemo157/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.17/src/util.rs:65:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: test failed, to rerun pass '--test compiletest'

Then, after hacking compiletest to run anyway, the tests fail because there is no std distributed with the target.

This change will fix the second issue by not attempting to run the tests if there is no libstd distributed with the target, which has a side-effect of fixing the first issue for at least embedded targets. There may be other targets that compiletest has an issue with, but do distribute libstd, but I can't see any easy way to deal with them.

@RalfJung RalfJung added the S-waiting-on-review Status: Waiting for a review to complete label Dec 1, 2018
tests/compiletest.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member

RalfJung commented Dec 2, 2018

Looks good, thanks! Will merge once CI is happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting for a review to complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants