-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #9892 - ehuss:cargo_test-ignore-reason, r=weihanglo
Add requirements to cargo_test. This extends the `#[cargo_test]` attribute to support some additional requirements to control whether or not a test can run. The motivation for this is: * Can more clearly see when a test is disabled when it prints "ignored" * Can more easily scan for disabled tests when I do version bumps to see which ones should be enabled on stable (to pass on CI). The form is a comma separated list of requirements, and if they don't pass the test is ignored. The requirements can be: * `nightly` — The test only runs on nightly. * `>=1.55` — The test only runs on rustc with the given version or newer. * `requires_git` — Requires the given command to be installed. Can be things like `requires_rustfmt` or `requires_hg`, etc. This also enforces that the author must write a reason why it is ignored (for some of the requirements) so that when I look for tests to update, I know why it is disabled. This also removes the `CARGO_TEST_DISABLE_GIT_CLI` option, which appears to no longer be necessary since we have migrated to GitHub Actions.
- Loading branch information
Showing
29 changed files
with
414 additions
and
897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.