]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: fix windows and plan9 builds
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 6 Mar 2012 05:33:44 +0000 (21:33 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 6 Mar 2012 05:33:44 +0000 (21:33 -0800)
Bit of a band-aid fix.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5757045

src/pkg/go/build/deps_test.go

index 9038924058125226c059042e5c5130342f98118e..d10bfa8f36e99daea6d0b1a813d7335d066c958f 100644 (file)
@@ -349,6 +349,17 @@ var bools = []bool{false, true}
 var geese = []string{"darwin", "freebsd", "linux", "netbsd", "openbsd", "plan9", "windows"}
 var goarches = []string{"386", "amd64", "arm"}
 
+type osPkg struct {
+       goos, pkg string
+}
+
+// allowedErrors are the operating systems and packages known to contain errors
+// (currently just "no Go source files")
+var allowedErrors = map[osPkg]bool{
+       osPkg{"windows", "log/syslog"}: true,
+       osPkg{"plan9", "log/syslog"}:   true,
+}
+
 func TestDependencies(t *testing.T) {
        var all []string
 
@@ -365,6 +376,9 @@ func TestDependencies(t *testing.T) {
                        }
                        p, err := ctxt.Import(pkg, "", 0)
                        if err != nil {
+                               if allowedErrors[osPkg{ctxt.GOOS, pkg}] {
+                                       continue
+                               }
                                // Some of the combinations we try might not
                                // be reasonable (like arm,plan9,cgo), so ignore
                                // errors for the auto-generated combinations.