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

proposal: cmd/go: test -json include file and line info #45733

Closed
TomMD opened this issue Apr 23, 2021 · 4 comments
Closed

proposal: cmd/go: test -json include file and line info #45733

TomMD opened this issue Apr 23, 2021 · 4 comments

Comments

@TomMD
Copy link

TomMD commented Apr 23, 2021

  1. Clone a go repository
  2. Change into the directory
  3. Run go test ./... -json

Running this process you should see output such as:

{ "Action" : "fail", "Package" : "foo", "Test" : "bar" }

It would be useful to have fields of filename and line_number as well, indicating where the named test is defined.

@seankhliao seankhliao changed the title Add fields to go test indicating test definition location proposal: cmd/go: test -json include file and line info Apr 23, 2021
@gopherbot gopherbot added this to the Proposal milestone Apr 23, 2021
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) May 11, 2021
@rsc
Copy link
Contributor

rsc commented May 12, 2021

go test -json runs test2json on the output of go test.
Since that info is not in the output, I don't see how we can add it.
More generally, it seems like programs can easily find the test by searching the files in the directory.

@rsc rsc moved this from Incoming to Active in Proposals (old) May 12, 2021
@rsc
Copy link
Contributor

rsc commented May 12, 2021

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc rsc moved this from Active to Likely Decline in Proposals (old) May 19, 2021
@rsc
Copy link
Contributor

rsc commented May 19, 2021

Based on the discussion above, this proposal seems like a likely decline.
— rsc for the proposal review group

@rsc rsc moved this from Likely Decline to Declined in Proposals (old) May 26, 2021
@rsc
Copy link
Contributor

rsc commented May 26, 2021

No change in consensus, so declined.
— rsc for the proposal review group

@rsc rsc closed this as completed May 26, 2021
@golang golang locked and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

3 participants