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 pkg -args -help" no longer passes -help to test binary #39997

Closed
mdempsky opened this issue Jul 2, 2020 · 2 comments
Closed

cmd/go: "go test pkg -args -help" no longer passes -help to test binary #39997

mdempsky opened this issue Jul 2, 2020 · 2 comments
Labels
Milestone

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Jul 2, 2020

CL 221427 (dcf0929) caused go test pkg -args -h and go test pkg -args -help to no longer pass -h and -help (respectively) to the compiled test binary as documented by go help testflag. Instead, it runs pkg's tests.

This is a regression in behavior from Go 1.14.

/cc @rsc @ianlancetaylor @sding3

@mdempsky
Copy link
Member Author

@mdempsky mdempsky commented Jul 2, 2020

Oh, cmd/go is passing -help to the test binary; but it's then interpreting the successful exit code as all tests green and printing "ok" instead of the output.

@ianlancetaylor ianlancetaylor added this to the Go1.15 milestone Jul 2, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Jul 2, 2020

Change https://golang.org/cl/240878 mentions this issue: cmd/go: display test binary output if invoked with -help

@gopherbot gopherbot closed this in 6a167c7 Jul 6, 2020
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
3 participants
You can’t perform that action at this time.