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:
parent
c26e340d2f
commit
dfbbb7b6d4
|
@ -63,6 +63,8 @@ func main() {
|
||||||
// analysis with facts using unitchecker under "go vet".
|
// analysis with facts using unitchecker under "go vet".
|
||||||
// It fork/execs the main function above.
|
// It fork/execs the main function above.
|
||||||
func TestIntegration(t *testing.T) {
|
func TestIntegration(t *testing.T) {
|
||||||
|
t.Skip("skipping broken test; golang.org/issue/28676")
|
||||||
|
|
||||||
if runtime.GOOS != "linux" {
|
if runtime.GOOS != "linux" {
|
||||||
t.Skipf("skipping fork/exec test on this platform")
|
t.Skipf("skipping fork/exec test on this platform")
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/ast"
|
"go/ast"
|
||||||
|
"go/build"
|
||||||
constantpkg "go/constant"
|
constantpkg "go/constant"
|
||||||
"go/parser"
|
"go/parser"
|
||||||
"go/token"
|
"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) { packagestest.TestAll(t, testJSON) }
|
||||||
func testJSON(t *testing.T, exporter packagestest.Exporter) {
|
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
|
//TODO: add in some errors
|
||||||
exported := packagestest.Export(t, exporter, []packagestest.Module{{
|
exported := packagestest.Export(t, exporter, []packagestest.Module{{
|
||||||
Name: "golang.org/fake",
|
Name: "golang.org/fake",
|
||||||
|
@ -1616,3 +1620,12 @@ func constant(p *packages.Package, name string) *types.Const {
|
||||||
}
|
}
|
||||||
return c.(*types.Const)
|
return c.(*types.Const)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func haveReleaseTag(tag string) bool {
|
||||||
|
for _, v := range build.Default.ReleaseTags {
|
||||||
|
if tag == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue