]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix go list -test where C is a dependency.
authorPaul Jolly <paul@myitcv.io>
Thu, 3 May 2018 07:42:45 +0000 (08:42 +0100)
committerIan Lance Taylor <iant@golang.org>
Tue, 8 May 2018 17:33:20 +0000 (17:33 +0000)
commit941b3b77648bb307c71d29b81b03349584f876e6
treef302071a99ac7904bebad5aef8ebd1ce38947ce5
parentcf4e5597b72965dd330ecaf2b2e828387fdb3998
cmd/go: fix go list -test where C is a dependency.

Currently go list -test runtime/cgo fails with an index out of range
error. This appears to be because the updating of import paths that
happens as part of -test doesn't take into account the fact that the
Internal.Imports of a package do not contain "C", whereas the public
Imports do.

Therefore we skip the public Import of "C" if it exists and continue.

Change-Id: I5cdc8968890fa7e5da3e375718606037d3282754
Reviewed-on: https://go-review.googlesource.com/111175
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/go_test.go
src/cmd/go/internal/list/list.go