Skip to content

skip-test: improve usability#66745

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
mgartner:fix-skip-test
Jun 23, 2021
Merged

skip-test: improve usability#66745
craig[bot] merged 2 commits intocockroachdb:masterfrom
mgartner:fix-skip-test

Conversation

@mgartner
Copy link
Copy Markdown
Contributor

skip-test: improve usage message

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

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/skip must be imported. The
skip-test utility now updates the BUILD.bazel file automatically.

Release note: None

@mgartner mgartner requested review from otan, rytaft and stevendanna June 23, 2021 01:03
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha this is copied straight from backport

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mgartner added 2 commits June 22, 2021 19:04
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
@mgartner
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 23, 2021

Build succeeded:

@craig craig bot merged commit b35fe17 into cockroachdb:master Jun 23, 2021
@mgartner mgartner deleted the fix-skip-test branch June 23, 2021 12:16
@jbowens
Copy link
Copy Markdown
Contributor

jbowens commented Jun 24, 2021

Thanks for this @mgartner!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants