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
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Member

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 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 the NeedsFix The path to resolution is known, but the work has not been done. label Jul 2, 2020
@ianlancetaylor ianlancetaylor added this to the Go1.15 milestone Jul 2, 2020
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Jul 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants