<div dir="ltr">FWIW, I wrote this little bash function and put it in my ~/.bashrc<div><div>function gotest {</div><div>  p="-gocheck.v"</div><div>  f=""</div><div>  if [ -n "$1" ]; then</div><div>
      if [ "$1" = "-r" ]; then</div><div>          p="./..."</div><div>      else</div><div>          f="-gocheck.f=$f"</div><div>      fi</div><div>  fi</div><div>  go test $p $f && go test -compiler=gccgo $p $f</div>
<div>}</div></div><div><br></div><div>That lets my write:</div><div>gotest</div><div>gotest -r</div><div>and</div><div>gotest justOneSuite</div><div><br></div><div>I'm sure something better could be done, but that makes things immediately useful.</div>
<div>The compile time is noticeably slower at getting the tests running (so this slows down iteration >2x), but until gccgo is ironed out it is probably still worthwhile.</div><div><br></div><div>John</div><div>=:-></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 16, 2014 at 6:53 AM, David Cheney <span dir="ltr"><<a href="mailto:david.cheney@canonical.com" target="_blank">david.cheney@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Tim,<br>
<br>
I think we're in the position that even if you don't use gccgo for<br>
your own development (understandable, it is slower), now that we have<br>
platforms we support in Trusty that must use gccgo, armv8 and ppc64el,<br>
for any new development, the code has to pass under both compilers.<br>
<br>
This is a bit of a bummer, but at least if you are running trusty on<br>
your development environment, you have all the bits you need[1][2].<br>
<br>
Running tests, for a single package then becomes<br>
<br>
    go test && go test -compiler=gccgo<br>
<br>
With respect to the whole Juju test suite, even after months of work<br>
there still remain a few tests which do not pass under trusty, these<br>
are tracked with bugs in lp, just look for the gccgo label if you find<br>
yourself at a loose end.<br>
<br>
Cheers<br>
<br>
Dave<br>
<br>
[1] Prior to trusty, you'd probably be using gccgo-4.8, which is not<br>
of acceptable quality for use with Juju.<br>
[2] If for some reason you don't want to upgrade to trusty, we may be<br>
able to ask Doko for a backport of gccgo-4.9, but really, just upgrade<br>
to trusty.<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, May 16, 2014 at 12:44 PM, Tim Penhey <<a href="mailto:tim.penhey@canonical.com">tim.penhey@canonical.com</a>> wrote:<br>
> I realise I left this bit hanging:<br>
><br>
> On 16/05/14 14:41, Tim Penhey wrote:<br>
>> A key issue that Dave and I have been poking with a stick is the test<br>
>> suite for juju/errgo, as it had some failures with gccgo (all passed<br>
>> with gc).<br>
><br>
> In the end it had to do with the runtime.Caller method for stack<br>
> analysis, and the synthetic methods that gccgo was creating.  The<br>
> solution was simply enough to convert the tests to use gocheck, that way<br>
> the synthetic methods that were being created are higher in the stack<br>
> that we ever look in the tests, and it is all good.<br>
><br>
> Tim<br>
><br>
><br>
> --<br>
> Juju-dev mailing list<br>
> <a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
> Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</div></div></blockquote></div><br></div>