-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add warning message when no tests are run. #11875
Comments
This may be a difficult issue to address due to the way tests are coordinated. When running This may be more feasible to address using the JSON output of the test harness, but that hasn't been stabilized yet or had much momentum in a while. And rust-lang/rust#108659 illustrates some of the difficulties of using the JSON interface, among other potential hazards. |
These tests had stopped running as of the module rename in #105, since `cargo test` silently ignores invalid test names, ref: rust-lang/cargo#11875 I'm going to be changing the way tests are split up in CI soon, which will also make this less fragile - so for now I'm just fixing the module name to restore test coverage on Heroku-20.
I'd love it if the warning could be optionally made fatal (eg via a |
These tests had stopped running as of the module rename in #105, since `cargo test` silently ignores invalid test names, ref: rust-lang/cargo#11875 I'm going to be changing the way tests are split up in CI soon, which will also make this less fragile - so for now I'm just fixing the module name to restore test coverage on Heroku-20. GUS-W-14346746.
Problem
When trying to run a specific test with a command like:
cargo test tests::test_lib
If you make a mistake in the path to the test it won't display any warning, it will just not run any tests:
As you can see in the screenshot if you make a typo in the path it will still look like it passed even though the test doesn't exist:
Proposed Solution
In my opinion, we should add a warning when the path leads to a nonexistent test e.g.:
Notes
No response
The text was updated successfully, but these errors were encountered: