Skip to content

cargo-miri: support running unit tests for libraries as well as test binaries #482

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

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

apoelstra
Copy link
Contributor

No description provided.

@apoelstra
Copy link
Contributor Author

This currently won't work because of #479 but it can be tested by hacking in a separate attribute that Miri detects rather than #[test].

@RalfJung
Copy link
Member

TBH, I don't actually understand this code, but if CI is happy it can't be worse than the old one.^^ What do you think @oli-obk?

@oli-obk oli-obk merged commit 3247c66 into rust-lang:master Oct 16, 2018
@apoelstra
Copy link
Contributor Author

To clarify -- for tests we pass --test <testname> -- <rustc args> to cargo. For libraries we pass -- --test <rustc args> to cargo. That is, we're moving --test from a cargo argument (find an appropriate test binary, compile it, etc etc) to a rustc argument (compile the test runner for whatever you're already being told to compile).

@RalfJung
Copy link
Member

If you you jet down some comments into the code, that'd be nice. :D

apoelstra added a commit to apoelstra/miri that referenced this pull request Oct 16, 2018
apoelstra added a commit to apoelstra/miri that referenced this pull request Oct 17, 2018
RalfJung added a commit that referenced this pull request Oct 18, 2018
add some comments to clarify command-line argument munging in #482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants