[go-nuts] Re: Running tests per package with Go module

2019-08-20 Thread Dr Waryaa
Hi Jacques,
Thanks for trying that. I found out that I was on a wild goose chase. As it 
turns out, it was code that my TestMain
called which had a hard-coded reference looking for the GOPATH.

Cheers,
Chris

On Wednesday, August 21, 2019 at 5:43:51 AM UTC+10, Jacques Supcik wrote:
>
> Hello Chris,
>
> I made a small project with the same structure as yours to reproduce the 
> problem : https://github.com/supcik/rtppwgm
>
> But in my project, everything works as expected :
>
> » go test -count=1 ./...
> ok  demo/pkg1   0.006s
> ok  demo/pkg2   0.006s
>
> » go test -count=1 ./pkg1/...
> ok  demo/pkg1   0.006s
>
> » go test -count=1 ./pkg2/...
> ok  demo/pkg2   0.005s
>
> Can you make a similar project that exposes your issue ?
>
> Cheers,
>
> -- Jacques
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c57ec25a-9559-4365-a866-16aee4efa15b%40googlegroups.com.


Re: [go-nuts] Re: Running tests per package with Go module

2019-08-20 Thread Marcin Romaszewicz
It could fail if you're under $GOPATH and GO111MODULE=auto, since inside
the GOPATH, auto=off

-- Marcin


On Tue, Aug 20, 2019 at 12:43 PM Jacques Supcik  wrote:

> Hello Chris,
>
> I made a small project with the same structure as yours to reproduce the
> problem : https://github.com/supcik/rtppwgm
>
> But in my project, everything works as expected :
>
> » go test -count=1 ./...
> ok  demo/pkg1   0.006s
> ok  demo/pkg2   0.006s
>
> » go test -count=1 ./pkg1/...
> ok  demo/pkg1   0.006s
>
> » go test -count=1 ./pkg2/...
> ok  demo/pkg2   0.005s
>
> Can you make a similar project that exposes your issue ?
>
> Cheers,
>
> -- Jacques
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/22e3a0fc-ed57-4b53-9ad5-faefab58c800%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2Bv29LsU%3DfjvmxSGtGe7qjN_t1xsvvF8BFVgYeJN5cfqLTO6%3Dg%40mail.gmail.com.


[go-nuts] Re: Running tests per package with Go module

2019-08-20 Thread Jacques Supcik
Hello Chris,

I made a small project with the same structure as yours to reproduce the 
problem : https://github.com/supcik/rtppwgm

But in my project, everything works as expected :

» go test -count=1 ./...
ok  demo/pkg1   0.006s
ok  demo/pkg2   0.006s

» go test -count=1 ./pkg1/...
ok  demo/pkg1   0.006s

» go test -count=1 ./pkg2/...
ok  demo/pkg2   0.005s

Can you make a similar project that exposes your issue ?

Cheers,

-- Jacques

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/22e3a0fc-ed57-4b53-9ad5-faefab58c800%40googlegroups.com.