mirror of https://github.com/golang/go.git
go/internal/gcimporter: temporarily skip the contraints package on the
unified builder Temporary work-around to fix TryBots until the failure can be investigated. Updates golang/go#48595 Change-Id: Ifbc27fc4551195bd9c7427bab7a79076c6ba6392 Reviewed-on: https://go-review.googlesource.com/c/tools/+/352050 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
6d1e33f1d0
commit
e1e06b8482
|
|
@ -31,6 +31,7 @@ import (
|
|||
"golang.org/x/tools/go/buildutil"
|
||||
"golang.org/x/tools/go/internal/gcimporter"
|
||||
"golang.org/x/tools/go/loader"
|
||||
"golang.org/x/tools/internal/testenv"
|
||||
)
|
||||
|
||||
func readExportFile(filename string) ([]byte, error) {
|
||||
|
|
@ -83,8 +84,15 @@ func TestIExportData_stdlib(t *testing.T) {
|
|||
Sizes: types.SizesFor(ctxt.Compiler, ctxt.GOARCH),
|
||||
},
|
||||
}
|
||||
// Temporarily skip packages that use generics on the unified builder, to fix
|
||||
// TryBots.
|
||||
//
|
||||
// TODO(#48595): fix this test with GOEXPERIMENT=unified.
|
||||
isUnified := os.Getenv("GO_BUILDER_NAME") == "linux-amd64-unified"
|
||||
for _, path := range buildutil.AllPackages(conf.Build) {
|
||||
conf.Import(path)
|
||||
if !(isUnified && testenv.UsesGenerics(path)) {
|
||||
conf.Import(path)
|
||||
}
|
||||
}
|
||||
|
||||
// Create a package containing type and value errors to ensure
|
||||
|
|
|
|||
|
|
@ -297,3 +297,9 @@ func SkipAfterGo1Point(t Testing, x int) {
|
|||
t.Skipf("running Go version %q is version 1.%d, newer than maximum 1.%d", runtime.Version(), Go1Point(), x)
|
||||
}
|
||||
}
|
||||
|
||||
// UsesGenerics reports if the standard library package stdlibPkg uses
|
||||
// generics.
|
||||
func UsesGenerics(stdlibPkg string) bool {
|
||||
return stdlibPkg == "constraints"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue