Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Cover doesn't work always #282

Closed
dwlnetnl opened this issue Sep 18, 2015 · 3 comments
Closed

Cover doesn't work always #282

dwlnetnl opened this issue Sep 18, 2015 · 3 comments

Comments

@dwlnetnl
Copy link

I'm encountering an issue where cover coloring doesn't work always. In small packages it works, no problems. But in 2 cases no color shows up:

  • Package that builds slowly because it's using C code using cgo.
  • Package that is has a bunch of imports, also including the package which uses cgo, I just mentioned.

There are no compile errors and all tests pass.

Can anyone give some pointers to investigate the issue?

UPDATE
It seems it has to do with the time it takes to execute the tests. Is it an idea to run by default the tests with -short? Or make it a setting?

go-plus information:

Go: go1.5.1 darwin/amd64 (@/usr/local/go/bin/go)
GOPATH: /path/to/gopath
Cover Tool: /usr/local/go/pkg/tool/darwin_amd64/cover
Vet Tool: /usr/local/go/pkg/tool/darwin_amd64/vet
Format Tool: /path/to/gopath/bin/goimports
Lint Tool: /path/to/gopath/bin/golint
Gocode Tool: /path/to/gopath/bin/gocode
Godef Tool: /path/to/gopath/bin/godef
Gocode Status: Enabled
Oracle Tool: /path/to/gopath/bin/oracle
Git: /usr/bin/git
PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin
Atom: 1.0.14 (darwin x64 14.5.0)
@maxhille
Copy link

maxhille commented Oct 1, 2015

I am having the same issue running AppEngine tests.

  • support for '-short' would be great
  • I still would like to see coverage for the full suite. Maybe 1. run short 2. colorize 3. run full 4. colorize

Is there a way to see background process output from eg. go test while they are running in the background?

@nfarina
Copy link

nfarina commented Oct 22, 2015

@maxhille Glad I noticed your post - I thought coverage wasn't working at all but now I notice the go executable being spun up in the background and disappearing too early (my tests take a lot of time since App Engine must start up a local instance of the dev server).

Would love if go-plus could wait longer for go test to execute - progress as well would be really great.

Overall though go-plus is the best thing ever!

@joefitzgerald
Copy link
Owner

The -short flag is now passed to tests. Test output is now shown. Next step is to make flags configurable globally and then allow package-specific settings for the flags to go test.

zmb3 added a commit that referenced this issue Jan 15, 2018
Introduce `go-plus.config.additional{Build|Test}Args` config properties that allow users to alter the flags that are passed to:

build args:
- go build / go install
- go test -c

test args:
- go test -coverprofile

This can be used to define build tags, for example.

- Fixes #282
- Fixes #308
- Fixes #551
- Fixes #573
- Closes #565
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