On Thursday, 11 April 2019 11:08:16 UTC+2, hui zhang wrote:
>
> I am developing go on mac
> but my test environment is on linux.
>
> Can I build a bin like 
> GOOS=linux GOARCH=amd64 go test -c && ./sum.test
>
> and do test on linux , and get a coverage report ?
> how?
>
> Need install go environment on linux ?
>

No. You need to enable coverage analysis via -cover during
compilation of the test binary. Then copy the generated test binary
(presumably your sum.test) to your linux environment and
execute it there; possibly with -coverprofile. You can copy the
generated coverprofile back to your Mac and analyze it there.

V.

-- 
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