]> Cypherpunks repositories - gostls13.git/commitdiff
go/internal/gccgoimporter: fix test when using gccgo 4.7
authorIan Lance Taylor <iant@golang.org>
Fri, 30 Nov 2018 20:26:10 +0000 (12:26 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 30 Nov 2018 20:46:23 +0000 (20:46 +0000)
TestInstallationImporter checks that it can read the export data for a
list of known standard library packages. It was failing on the SmartOS
builder which has GCC 4.7 installed. Skip packages that did not exist
in GCC 4.7. Most packages are still there and the missing packages are
fairly simple, so this doesn't really affect test quality.

Updates #29006

Change-Id: If7ae6f83d51d40168a9692acb0b99c9bf21f2a4d
Reviewed-on: https://go-review.googlesource.com/c/152077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/go/internal/gccgoimporter/gccgoinstallation_test.go

index 732159ca63200dd34a74e0e1905b88f60ffe4d2b..b332babc7b685cfd35c474b5db7f34dc3dc14357 100644 (file)
@@ -9,6 +9,11 @@ import (
        "testing"
 )
 
+// importablePackages is a list of packages that we verify that we can
+// import. This should be all standard library packages in all relevant
+// versions of gccgo. Note that since gccgo follows a different release
+// cycle, and since different systems have different versions installed,
+// we can't use the last-two-versions rule of the gc toolchain.
 var importablePackages = [...]string{
        "archive/tar",
        "archive/zip",
@@ -55,7 +60,7 @@ var importablePackages = [...]string{
        "encoding/binary",
        "encoding/csv",
        "encoding/gob",
-       "encoding",
+       // "encoding", // Added in GCC 4.9.
        "encoding/hex",
        "encoding/json",
        "encoding/pem",
@@ -67,7 +72,7 @@ var importablePackages = [...]string{
        "go/ast",
        "go/build",
        "go/doc",
-       "go/format",
+       // "go/format", // Added in GCC 4.8.
        "go/parser",
        "go/printer",
        "go/scanner",
@@ -80,7 +85,7 @@ var importablePackages = [...]string{
        "html",
        "html/template",
        "image/color",
-       "image/color/palette",
+       // "image/color/palette", // Added in GCC 4.9.
        "image/draw",
        "image/gif",
        "image",
@@ -99,7 +104,7 @@ var importablePackages = [...]string{
        "mime/multipart",
        "net",
        "net/http/cgi",
-       "net/http/cookiejar",
+       // "net/http/cookiejar", // Added in GCC 4.8.
        "net/http/fcgi",
        "net/http",
        "net/http/httptest",