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: 'go test ./...' not support failfast flag #50507

Closed
bigdata-page opened this issue Jan 8, 2022 · 4 comments
Closed

cmd/go: 'go test ./...' not support failfast flag #50507

bigdata-page opened this issue Jan 8, 2022 · 4 comments
Labels
FrozenDueToAge GoCommand cmd/go WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@bigdata-page
Copy link

when i run go test -failfast TestName,the failfast flgs is working, but when i run go test -failfast ./...(the directory contain many package),the failfast not working。

@bigdata-page bigdata-page changed the title cmd/test: when you run go test ./... , want to support failfast flag cmd/test: the command go test ./... not support failfast flag Jan 8, 2022
@bcmills bcmills added GoCommand cmd/go and removed pkgsite labels Jan 10, 2022
@bcmills bcmills changed the title cmd/test: the command go test ./... not support failfast flag cmd/go: 'go test ./...' not support failfast flag Jan 10, 2022
@bcmills
Copy link
Member

bcmills commented Jan 10, 2022

Please fill out the complete issue template. What did you do, what did you expect to see, and what did you actually see?

@bcmills
Copy link
Member

bcmills commented Jan 10, 2022

#30522 may be related.

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 10, 2022
@bigdata-page
Copy link
Author

bigdata-page commented Jan 11, 2022

@bcmills

go version: go version go1.16.5 windows/amd64

What did you do?

the file dir:

pkg
  test
    test1
	 example1_test.go
    test2
	 example2_test.go

the example content:

//  example1_test.go
func TestName1(t *testing.T) {
	assert.Fail(t, "the name1 test unit failed.")
}
//  example2_test.go
func TestName2(t *testing.T) {
	assert.Fail(t, "the name2 test unit failed.")
}

exec the command:

# cd pkg/
# go test ./... -failfast

What did you expect to see?

I expect when TestName1 execute failed,TestName2 not execute.

What did you see instead?

when TestName1 execute failed,TestName2 continue execute.

@seankhliao
Copy link
Member

Duplicate of #33038

@seankhliao seankhliao marked this as a duplicate of #33038 Feb 8, 2022
@golang golang locked and limited conversation to collaborators Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants