gonum / blas

A BLAS implementation for Go [DEPRECATED]
172 stars 16 forks source link

go tool cover -html=xxx shows no coverage for blas/cblas #21

Closed jonlawlor closed 9 years ago

jonlawlor commented 10 years ago

When I run go test -cover for cblas the coverage percentage appears to be right, but when I run go test -coverprofile=coverage.out and then go tool cover -html=coverage.out it shows only one line covered. When running go tool cover -func=coverage.out the percentages show that many of the functions should actually be covered.

I suspect this is a problem with the go tool, but I'd like to verify that other people are seeing this as well. It appears to be cgo related.

kortschak commented 9 years ago

I can confirm this.

jonlawlor commented 9 years ago

I'll see if there is anything on this in the go issue tracker.

jonlawlor commented 9 years ago

There is a closed issue that seems to be related: https://github.com/golang/go/issues/6333

There, mattn showed coverage as 0. In this case we have incorrectly low but nonzero coverage, so it isn't caught by the test they added.

jonlawlor commented 9 years ago

The go devs have recognized the issue and are addressing it as they can: https://github.com/golang/go/issues/9479