(Since this is the top result for this issue): Ran into this myself, and 
was surprised to find the coverage run passed at tip 
<https://travis-ci.org/cceckman/discoirc/builds/331623961?utm_source=github_status&utm_medium=notification>
 (but 
not 1.8 or 1.9.) Looks like this is fixed in the 1.10 candidate:

https://tip.golang.org/doc/go1.10#test

"Also, the go test -coverprofile option is now supported when running 
multiple tests."


On Thursday, May 4, 2017 at 5:29:26 AM UTC-7, j...@drivr.com wrote:
>
> Anyone else noticed how slow it is to run `go test` separately for every 
> package?
>
> On Wednesday, May 4, 2016 at 2:37:57 AM UTC+3, Fabricio Godoy wrote:
>>
>> Solution for Makefile: 
>> https://gist.github.com/13ebe8220822bc19494c8b076aabe9fc.git
>>
>> .PHONY: test-cover-html
>>> PACKAGES = $(shell find ./ -type d -not -path '*/\.*')
>>>
>>> test-cover-html:
>>>     echo "mode: count" > coverage-all.out
>>>     $(foreach pkg,$(PACKAGES),\
>>>             go test -coverprofile=coverage.out -covermode=count $(pkg);\
>>>             tail -n +2 coverage.out >> coverage-all.out;)
>>>     go tool cover -html=coverage-all.out
>>>
>>>
>>
>> Em domingo, 13 de outubro de 2013 01:42:04 UTC-3, sam.n...@sendgrid.com 
>> escreveu:
>>>
>>> I'm trying out the new cover tool but it looks like it can't produce 
>>> profile output for multiple packages, I get:
>>>
>>> $ go test -coverprofile=c.out -covermode=count ./...
>>> cannot use test profile flag with multiple packages
>>>
>>> I suppose I could make a script which builds the profile output 
>>> one-by-one, but is there a built-in way of doing this?
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to