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

cmd/go: -failfast flag does not apply across packages #33038

Closed
dsnet opened this issue Jul 10, 2019 · 8 comments
Closed

cmd/go: -failfast flag does not apply across packages #33038

dsnet opened this issue Jul 10, 2019 · 8 comments
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented Jul 10, 2019

Using go1.12

The documentation for failfast says "Do not start new tests after the first test failure."

When running go test ./... -failfast and one of the packages has a failure, it continues to run the tests for other packages. My interpretation of the documentation above is that go test would stop after any failure, even if in a different package.

@dmitshur dmitshur added GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jul 15, 2019
@dmitshur dmitshur added this to the Go1.14 milestone Jul 15, 2019
@dmitshur dmitshur changed the title testing: failfast flags does not apply across packages cmd/go: -failfast flag does not apply across packages Jul 15, 2019
@dmitshur
Copy link
Contributor

/cc @jayconrod @bcmills

@zenovich
Copy link

zenovich commented Jul 23, 2019

For now, this command helps me a lot:

for s in $(go list ./...); do if ! go test -failfast -v -p 1 $s; then break; fi; done

@lookfirst

This comment was marked as duplicate.

@docmerlin

This comment was marked as duplicate.

@mvdan
Copy link
Member

mvdan commented Jul 27, 2022

Please refrain from "bumping" github threads; see https://github.com/golang/go/wiki/NoPlusOne. If you would like to speed up the resolution of this issue, you can either react with a 👍 on the original post, or look into sending a CL with a test. See https://go.dev/doc/contribute :)

kerzhner added a commit to statechannels/go-nitro that referenced this issue Mar 23, 2023
Note that the flag will stop future tests for a failing package.
But tests for other packages will continue. See
golang/go#33038
kerzhner added a commit to statechannels/go-nitro that referenced this issue Mar 24, 2023
Note that the flag will stop future tests for a failing package.
But tests for other packages will continue. See
golang/go#33038
bendrucker added a commit to observeinc/terraform-provider-observe that referenced this issue Jul 26, 2023
Run `go test` to exit as soon as one test fails. While this may mean the test you care about never runs, it's better than waiting for a whole suite after one flake:

Since all our acceptance tests are in one package `-failfast` should work:

golang/go#33038
AlexanderYastrebov added a commit to AlexanderYastrebov/go that referenced this issue Sep 18, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/529198 mentions this issue: cmd/go: fail fast across packages

AlexanderYastrebov added a commit to AlexanderYastrebov/go that referenced this issue Sep 25, 2023
AlexanderYastrebov added a commit to AlexanderYastrebov/go that referenced this issue Sep 25, 2023
AlexanderYastrebov added a commit to AlexanderYastrebov/go that referenced this issue Dec 10, 2023
@AlexanderYastrebov
Copy link
Contributor

Bump :)

AlexanderYastrebov added a commit to AlexanderYastrebov/go that referenced this issue Feb 8, 2024
@AlexanderYastrebov
Copy link
Contributor

Please refrain from "bumping" github threads

@mvdan @bcmills @dsnet How do I bring attention back? PR is ready since October 2023

@dmitshur dmitshur added the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Feb 8, 2024
AlexanderYastrebov added a commit to AlexanderYastrebov/go that referenced this issue Feb 17, 2024
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 17, 2024
@dmitshur dmitshur modified the milestones: Backlog, Go1.23 Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants