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

cargo miri test does not support dev-dependencies on in-crate tests #612

Closed
RalfJung opened this Issue Feb 6, 2019 · 4 comments

Comments

Projects
None yet
1 participant
@RalfJung
Copy link
Member

RalfJung commented Feb 6, 2019

Reported by @Amanieu: dev-dependencies do not seem to get built when doing cargo miri test.

@RalfJung

This comment has been minimized.

Copy link
Member Author

RalfJung commented Feb 6, 2019

Hm, actually it supports them in my tests -- but not in hashbrown. Strange.

@RalfJung RalfJung changed the title cargo miri test does not support dev-dependencies cargo miri test does not support dev-dependencies on in-crate tests Feb 6, 2019

@RalfJung

This comment has been minimized.

Copy link
Member Author

RalfJung commented Feb 6, 2019

Actually the problem is in-crate tests (as opposed to tests in the tests/ directory): cargo rustc --bin foo -- --tests fails to build when there is a dev-dependency, because we unilaterally add --tests to the rustc flags but cargo doesn't know so it cannot build the dev-dependencies.

@RalfJung

This comment has been minimized.

Copy link
Member Author

RalfJung commented Feb 7, 2019

Unfortunately I had to revert this fix (for lib crates only) because of rust-lang/cargo#6640.

@RalfJung

This comment has been minimized.

Copy link
Member Author

RalfJung commented Feb 7, 2019

Ah turns out I used cargo wrong, this will be fixed by #618.

@RalfJung RalfJung closed this Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.