Skip to content
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

cli: allow multiple -focus and -skip flags #736

Merged
merged 1 commit into from Jan 11, 2021
Merged

Conversation

kolyshkin
Copy link
Contributor

As an example, now instead of

... --skip one|two|three|four ...

one can specify

... \
--skip one \
--skip two \
--skip three \
--skip four \
...

which helps readability and maintainability a lot in case there are many
tests to skip.

Fixes #735 (check it for more real-world example).

As an example, now instead of

	... --skip one|two|three|four ...

one can specify

	... \
	--skip one \
	--skip two \
	--skip three \
	--skip four \
	...

which helps readability and maintainability a lot in case there are many
tests to skip.

Fixes onsi#735

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

@onsi PTAL

@onsi
Copy link
Owner

onsi commented Dec 23, 2020

whoops - sorry I missed this PR @kolyshkin . I'll take a look sometime in the next few days and merge it in.

@onsi onsi merged commit 9a782fb into onsi:master Jan 11, 2021
@onsi
Copy link
Owner

onsi commented Jan 11, 2021

sorry for the delay - this looks good!

This was referenced Mar 17, 2021
@@ -186,7 +186,7 @@ var _ = Describe("Suite", func() {

Context("when provided with a filter", func() {
BeforeEach(func() {
focusString = `inner|\d`
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change. Users who relied on -ginkgo.skip overwriting the old value will be surprised... I certainly was and it took me a while to figure out why some tests no longer ran.

The reason was this default:

	// Skip slow or distruptive tests by default.
	flag.Set("ginkgo.skip", `\[Slow|Disruptive\]`)
	flag.Parse()

We overwrite that default in our Makefile, but because of this change, the skip string above remained in effect.

Copy link

Choose a reason for hiding this comment

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

+1
maybe need keep this test, keep no breaking change.

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.

[feature] [cli] ability to specify multiple -focus and -skip flags
4 participants