skip-test: improve usability#66745
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Jun 23, 2021
Merged
Conversation
Member
otan
approved these changes
Jun 23, 2021
pkg/cmd/skip-test/main.go
Outdated
Contributor
There was a problem hiding this comment.
Haha this is copied straight from backport
Contributor
Author
There was a problem hiding this comment.
backport is a bit smarter: https://github.com/benesch/backport/blob/69513f3c0e5b199de33f40c1b230a29d820def14/main.go#L187-L188
Previously, the usage message printed by `skip-test` did not clearly explain
correct usage of the utility. Now the usage message reads:
```
The skip-test utility creates a pull request to skip a test.
Example usage:
./bin/skip-test -issue_num 1234 pkg/to/test:TestToSkip
The following options are available:
-issue_num int
issue to link the skip to; if unset skip-test will
try to search for existing issues based on the test name
-reason string
reason to put under skip (default "flaky test")
-under_bazel
if true, only skip under bazel
-under_race
if true, only skip under race
```
Release note: None
Skipping a test requires the BUILD.bazel file in the test's package to be updated because `pkg/testutils/skip` must be imported. The `skip-test` utility now updates the BUILD.bazel file automatically. Release note: None
Contributor
Author
|
TFTR! bors r+ |
Contributor
|
Build succeeded: |
Contributor
|
Thanks for this @mgartner! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
skip-test: improve usage message
Previously, the usage message printed by
skip-testdid not clearly explaincorrect usage of the utility. Now the usage message reads:
Release note: None
skip-test: update BUILD.bazel files when skipping a test
Skipping a test requires the BUILD.bazel file in the test's package to
be updated because
pkg/testutils/skipmust be imported. Theskip-testutility now updates the BUILD.bazel file automatically.Release note: None