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

Open
liulianjun opened this issue Jan 8, 2022 · 3 comments
Open

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

liulianjun opened this issue Jan 8, 2022 · 3 comments

Comments

@liulianjun
Copy link

@liulianjun liulianjun commented Jan 8, 2022

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。

@liulianjun liulianjun 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 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 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 bcmills commented Jan 10, 2022

#30522 may be related.

@liulianjun
Copy link
Author

@liulianjun liulianjun 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants