From 3ce9e5a10e19055610d82e87c3fef44d71f1afc5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 30 Nov 2018 12:26:10 -0800 Subject: [PATCH] go/internal/gccgoimporter: fix test when using gccgo 4.7 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 Reviewed-by: Than McIntosh TryBot-Result: Gobot Gobot --- .../gccgoimporter/gccgoinstallation_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/go/internal/gccgoimporter/gccgoinstallation_test.go b/src/go/internal/gccgoimporter/gccgoinstallation_test.go index 732159ca63..b332babc7b 100644 --- a/src/go/internal/gccgoimporter/gccgoinstallation_test.go +++ b/src/go/internal/gccgoimporter/gccgoinstallation_test.go @@ -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", -- 2.50.0