juju/testing — pull request #10 by davecheney (2014-06-04 01:28:40+00:00)
Title: Skip stdlib depdencies during find imports

The find imports tests always exclude paths that don't begin with the stated prefix, so in truth they also implicitly exclude the std lib.

However, prior to this test the stdlib was being traversed to build up a dependency set, then discarded, which was fine. However this assumed that the location of the stdlib source was set, ie $GOROOT/src/pkg points to the source of the std library. However this is not required to be true, and is not true for gccgo.

To make this helper work across all compilers, establish a map of known standard library packages and don't recurse through them as it is not possible for the dependency graph to flow from a package in $GOROOT to $GOPATH, ie, the std lib cannot depend on a third party package.