From f0fef323833b9b060024507a3229fa7bf9b523a8 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Fri, 16 Aug 2013 12:49:51 +1000 Subject: [PATCH] cmd/go: fix at least some instances of double compilation When the packages the tested package depends on don't build, we weren't getting out early. Added a simple check for a successful build to an existing early out. There may be other ways that double compilation arises, but this fixes the one listed in the issue. Fixes #5679 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/13036043 --- src/cmd/go/test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go index d4a1c50f41..002758c3b1 100644 --- a/src/cmd/go/test.go +++ b/src/cmd/go/test.go @@ -378,7 +378,7 @@ func runTest(cmd *Command, args []string) { a.deps = append(a.deps, b.action(modeInstall, modeInstall, p)) } b.do(a) - if !testC { + if !testC || a.failed { return } b.init() -- 2.48.1