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

go.tools/cmd/cover: doesn't work with cgo #6333

Closed
mattn opened this issue Sep 5, 2013 · 9 comments
Closed

go.tools/cmd/cover: doesn't work with cgo #6333

mattn opened this issue Sep 5, 2013 · 9 comments
Milestone

Comments

@mattn
Copy link
Member

mattn commented Sep 5, 2013

1. clone github.com/mattn/go-sqlite3
2. go test -coverprofile=foo.out
3. go tool cover -html=foo.out

What is the expected output?

  Show coverage results

What do you see instead?

  No information about coverage

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

  8g

Which operating system are you using?

  Windows7

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

  go version devel +2f13cc5d7043 Tue Aug 27 14:53:57 2013 +1000 windows/386
@adg
Copy link
Contributor

adg commented Sep 5, 2013

Comment 1:

Do you mean coverage of the C code or Go packages that use cgo?

Labels changed: added go1.2maybe.

Owner changed to @robpike.

Status changed to Accepted.

@mattn
Copy link
Member Author

mattn commented Sep 6, 2013

Comment 2:

I don't mean coverage of C code. If the Go code contains cgo, cover output 0% result.

@rsc
Copy link
Contributor

rsc commented Oct 2, 2013

Comment 3:

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

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added release-go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 7:

Labels changed: added repo-tools.

@gopherbot
Copy link

Comment 8 by wkschwartz:

I also am having this problem.
To reproduce:
1. git clone github.com/wkschwartz/pigosat
2. go test -cover
What is the expected output?
  I counted my test coverage by hand. I think my tests are close to covering about 95% of statements.
What do you see instead?
  PASS
  coverage: 0.0% of statements
  ok    pigosat 0.021s
Which compiler are you using (5g, 6g, 8g, gccgo)?
  6g
Which operating system are you using?
  Darwin
Which version are you using?  (run 'go version')
  go version go1.2 darwin/amd64

@gopherbot
Copy link

Comment 9 by wkschwartz:

I should note that for github.com/wkschwartz/pigosat, you should be on or before commit
0147b11afbfc50ea72a408a1f0bcca65b6756ee0

@rsc
Copy link
Contributor

rsc commented Mar 6, 2014

Comment 10:

This issue was closed by revision 9abcd53.

Status changed to Fixed.

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

5 participants