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: consistent reporting for test compilation errors #4701

Closed
gopherbot opened this issue Jan 24, 2013 · 4 comments
Closed

cmd/go: consistent reporting for test compilation errors #4701

gopherbot opened this issue Jan 24, 2013 · 4 comments
Milestone

Comments

@gopherbot
Copy link

by gerg.ward:

What steps will reproduce the problem?
1. unzip the attached zip file
2. cd test-reporting
2. go test

What is the expected output?

# _/tmp/test-reporting
x_test.go:16:15: expected identifier
FAIL    _/tmp/test-reporting [build failed]

What do you see instead?
# _/tmp/test-reporting
x_test.go:16:15: expected identifier

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

Ubuntu 12.10 (quantal)

Which version are you using?  (run 'go version')

go version devel +fa2a0aff01f7 Thu Jan 24 20:46:33 2013 +1100 linux/amd64

(can also reproduce with 1.0.3)

Please provide any additional information below.

The difference between expected and actual output is subtle, and only a problem when
running lots of tests. It's particularly confusing when you have multiple failures, some
of which are reported with the big obvious "FAIL", and some of which are just
buried in compiler output two pages up.

The particular compilation error that triggers this for me is

  func setup() (boguspkg.bogustype, y int) {
  }

i.e. a syntax error combined with a non-existent package. It seems to take *two* errors
to cause this situation. Full working example attached: go-test-error-reporting.zip.

Attachments:

  1. go-test-error-reporting.zip (817 bytes)
@minux
Copy link
Member

minux commented Jan 24, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Mar 12, 2013

Comment 2:

Labels changed: added go1.1maybe, removed go1.1.

@robpike
Copy link
Contributor

robpike commented May 18, 2013

Comment 3:

Labels changed: added go1.2maybe, removed go1.1maybe.

@rsc
Copy link
Contributor

rsc commented Sep 10, 2013

Comment 4:

This issue was closed by revision baed067.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants