1
0
mirror of https://github.com/golang/go synced 2024-11-18 17:54:57 -07:00

go/packages, go/analysis/internal/unitchecker: skip broken tests for now

Updates golang/go#28609
Updates golang/go#28676

Change-Id: Id0fbc6cb0ce14aed9b20afcd0488708df33d5a62
Reviewed-on: https://go-review.googlesource.com/c/148637
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Brad Fitzpatrick 2018-11-08 18:11:12 +00:00
parent c26e340d2f
commit dfbbb7b6d4
2 changed files with 15 additions and 0 deletions

View File

@ -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")
}

View File

@ -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
}