-
Notifications
You must be signed in to change notification settings - Fork 314
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
Support flags for cargo nextest
?
#562
Comments
If you base criterion on libtest-mimic 0.4.0 or above, this will automatically work FYI :) |
Hello! Thanks for the suggestion. I guess my feeling is that Criterion benchmarks aren't tests, so it doesn't make sense to run them with your tests. For one thing, benchmarks are automatically compiled under a different optimization profile from tests, and mixing optimized and unoptimized benchmark runs would produce confusing results. Perhaps I'm misunderstanding the goal here. However, Criterion-rs does have a test mode, where running the benchmarks with On that basis, I would be open to a pull request adding some additional CLI options that switch it into testing mode and substitute in a nextest-compatible output formatter when it detects Since Criterion-rs isn't really trying to be a test harness, I believe that using I would appreciate it if the FYI: I did see another issue recently that proposed replacing the |
Thanks for the response!
Yes, that's been the mode where there's been user interest to run nextest against. Note that nextest doesn't need any options that aren't already supported by libtest. So it might just be a matter of adding a couple of flags to criterion to make it more compatible with libtest. |
Hi all,
I was trying out
cargo nextest
with https://github.com/vectordotdev/vector . I'd like to be able to run the criterion benchmarks as tests too, but ran into issues due to expectations thatcargo nextest
has of the test harness to support the flags mentioned on https://nexte.st/book/custom-test-harnesses.html similar tolibtest
. Is this something you'd be open to a PR for?Relevant:
The text was updated successfully, but these errors were encountered: