]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix at least some instances of double compilation
authorRob Pike <r@golang.org>
Fri, 16 Aug 2013 02:49:51 +0000 (12:49 +1000)
committerRob Pike <r@golang.org>
Fri, 16 Aug 2013 02:49:51 +0000 (12:49 +1000)
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

index d4a1c50f410c1c07e12bf16d10dab1b781a104af..002758c3b1b3bd2a9389a2660d3aa8427ce37e06 100644 (file)
@@ -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()