go/internal/gcimporter: skip stdlib tests in race mode as they are too slow
The duration causes them to be flakey on the builders. Change-Id: I968c6418054e42e3758a6ba4030750f12c4d4b66 Reviewed-on: https://go-review.googlesource.com/c/tools/+/180844 Run-TryBot: Ian Cottrell <iancottrell@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
2c3de6a5ae
commit
a544cfa389
|
@ -22,6 +22,8 @@ import (
|
||||||
"golang.org/x/tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var isRace = false
|
||||||
|
|
||||||
func TestBExportData_stdlib(t *testing.T) {
|
func TestBExportData_stdlib(t *testing.T) {
|
||||||
if runtime.Compiler == "gccgo" {
|
if runtime.Compiler == "gccgo" {
|
||||||
t.Skip("gccgo standard library is inaccessible")
|
t.Skip("gccgo standard library is inaccessible")
|
||||||
|
@ -29,6 +31,9 @@ func TestBExportData_stdlib(t *testing.T) {
|
||||||
if runtime.GOOS == "android" {
|
if runtime.GOOS == "android" {
|
||||||
t.Skipf("incomplete std lib on %s", runtime.GOOS)
|
t.Skipf("incomplete std lib on %s", runtime.GOOS)
|
||||||
}
|
}
|
||||||
|
if isRace {
|
||||||
|
t.Skipf("stdlib tests take too long in race mode and flake on builders")
|
||||||
|
}
|
||||||
|
|
||||||
// Load, parse and type-check the program.
|
// Load, parse and type-check the program.
|
||||||
ctxt := build.Default // copy
|
ctxt := build.Default // copy
|
||||||
|
|
|
@ -35,6 +35,9 @@ func TestIExportData_stdlib(t *testing.T) {
|
||||||
if runtime.GOOS == "android" {
|
if runtime.GOOS == "android" {
|
||||||
t.Skipf("incomplete std lib on %s", runtime.GOOS)
|
t.Skipf("incomplete std lib on %s", runtime.GOOS)
|
||||||
}
|
}
|
||||||
|
if isRace {
|
||||||
|
t.Skipf("stdlib tests take too long in race mode and flake on builders")
|
||||||
|
}
|
||||||
|
|
||||||
// Load, parse and type-check the program.
|
// Load, parse and type-check the program.
|
||||||
ctxt := build.Default // copy
|
ctxt := build.Default // copy
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
// Copyright 2019 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build race
|
||||||
|
|
||||||
|
package gcimporter_test
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
isRace = true
|
||||||
|
}
|
Loading…
Reference in New Issue