diff --git a/go/analysis/internal/unitchecker/unitchecker_test.go b/go/analysis/internal/unitchecker/unitchecker_test.go index a00ce4f2..7466cd8d 100644 --- a/go/analysis/internal/unitchecker/unitchecker_test.go +++ b/go/analysis/internal/unitchecker/unitchecker_test.go @@ -63,6 +63,8 @@ func main() { // analysis with facts using unitchecker under "go vet". // It fork/execs the main function above. func TestIntegration(t *testing.T) { + t.Skip("skipping broken test; golang.org/issue/28676") + if runtime.GOOS != "linux" { t.Skipf("skipping fork/exec test on this platform") } diff --git a/go/packages/packages_test.go b/go/packages/packages_test.go index 275e8899..f2399e84 100644 --- a/go/packages/packages_test.go +++ b/go/packages/packages_test.go @@ -9,6 +9,7 @@ import ( "encoding/json" "fmt" "go/ast" + "go/build" constantpkg "go/constant" "go/parser" "go/token" @@ -1221,6 +1222,9 @@ func TestName_ModulesDedup(t *testing.T) { func TestJSON(t *testing.T) { packagestest.TestAll(t, testJSON) } func testJSON(t *testing.T, exporter packagestest.Exporter) { + if !haveReleaseTag("go1.11") { + t.Skip("skipping; flaky before Go 1.11; https://golang.org/issue/28609") + } //TODO: add in some errors exported := packagestest.Export(t, exporter, []packagestest.Module{{ Name: "golang.org/fake", @@ -1616,3 +1620,12 @@ func constant(p *packages.Package, name string) *types.Const { } return c.(*types.Const) } + +func haveReleaseTag(tag string) bool { + for _, v := range build.Default.ReleaseTags { + if tag == v { + return true + } + } + return false +}