Commit 10c2f56b authored by Andrew Gerrand's avatar Andrew Gerrand

cmd/go: download test dependencies of all named packages

Fixes #8181.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/123870043
parent 750bf48a
......@@ -151,7 +151,9 @@ func download(arg string, stk *importStack, getTestDeps bool) {
}
// Only process each package once.
if downloadCache[arg] {
// (Unless we're fetching test dependencies for this package,
// in which case we want to process it again.)
if downloadCache[arg] && !getTestDeps {
return
}
downloadCache[arg] = true
......
......@@ -543,6 +543,17 @@ TEST go get cover
unset GOPATH
rm -rf $d
TEST go get -t "code.google.com/p/go-get-issue-8181/{a,b}"
d=$(TMPDIR=/var/tmp mktemp -d -t testgoXXX)
export GOPATH=$d
if ./testgo get -t code.google.com/p/go-get-issue-8181/{a,b}; then
./testgo list ... | grep go.tools/godoc > /dev/null || ok=false
else
ok=false
fi
unset GOPATH
rm -rf $d
TEST shadowing logic
export GOPATH=$(pwd)/testdata/shadow/root1:$(pwd)/testdata/shadow/root2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment