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

Revamp "./miri test": parse --target ourselves, pass the rest to the test harness #3586

Closed
RalfJung opened this issue May 8, 2024 · 3 comments
Labels
A-dev Area: working on Miri as a developer C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-good-first-issue A good way to start contributing, mentoring is available

Comments

@RalfJung
Copy link
Member

RalfJung commented May 8, 2024

./miri test <flags> just sends all the flags to cargo as-is. That's suboptimal for (at least) two reasons:

  • ./miri test filter works, but to filter two things one has to do ./miri test -- filter1 filter2. This is also how cargo works but it is surprising.
  • ./miri test --target foo interprets foo as a host target. That's consistent with ./miri build, but it's basically never what you want. MIRI_TEST_TARGET=foo ./miri test is what you want, but that's longer to type, non-standard, and especially inconvenient on Windows.

So I think we should make this command be ./miri test [--target target] <flags>, where target does the same thing as MIRI_TEST_TARGET, and <flags> are passed to the test harness -- i.e., the invocation will be cargo test -- <flags> (note the extra --).

@RalfJung RalfJung added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-good-first-issue A good way to start contributing, mentoring is available A-dev Area: working on Miri as a developer labels May 8, 2024
@RalfJung
Copy link
Member Author

RalfJung commented May 8, 2024

@RossSmyth would you like to give this a try? :)

@RossSmyth
Copy link
Contributor

RossSmyth commented May 8, 2024

#3588

Don't worry, I planned on working on it :)

@RalfJung
Copy link
Member Author

RalfJung commented May 9, 2024

Fixes by #3588

@RalfJung RalfJung closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dev Area: working on Miri as a developer C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-good-first-issue A good way to start contributing, mentoring is available
Projects
None yet
Development

No branches or pull requests

2 participants