mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
cmd/api: skip 3 non-TestCheck tests in -check mode
TestIssue64958 takes a while, so it's not worth running both without and with -check flag. The others are fast, but there's still no good reason to run anything but TestCheck when the -check flag is on. Change-Id: I13ebb90e3c863006f21441909b05364e1b316ed6 Reviewed-on: https://go-review.googlesource.com/c/go/+/668656 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
1cc624fd62
commit
f760e1fe49
@ -99,6 +99,11 @@ func TestGolden(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCompareAPI(t *testing.T) {
|
func TestCompareAPI(t *testing.T) {
|
||||||
|
if *flagCheck {
|
||||||
|
// not worth repeating in -check
|
||||||
|
t.Skip("skipping with -check set")
|
||||||
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
features, required, exception []string
|
features, required, exception []string
|
||||||
@ -180,6 +185,11 @@ func TestCompareAPI(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSkipInternal(t *testing.T) {
|
func TestSkipInternal(t *testing.T) {
|
||||||
|
if *flagCheck {
|
||||||
|
// not worth repeating in -check
|
||||||
|
t.Skip("skipping with -check set")
|
||||||
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
pkg string
|
pkg string
|
||||||
want bool
|
want bool
|
||||||
@ -294,14 +304,20 @@ func TestIssue41358(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestIssue64958(t *testing.T) {
|
func TestIssue64958(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping with -short")
|
||||||
|
}
|
||||||
|
if *flagCheck {
|
||||||
|
// slow, not worth repeating in -check
|
||||||
|
t.Skip("skipping with -check set")
|
||||||
|
}
|
||||||
|
testenv.MustHaveGoBuild(t)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if x := recover(); x != nil {
|
if x := recover(); x != nil {
|
||||||
t.Errorf("expected no panic; recovered %v", x)
|
t.Errorf("expected no panic; recovered %v", x)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
testenv.MustHaveGoBuild(t)
|
|
||||||
|
|
||||||
for _, context := range contexts {
|
for _, context := range contexts {
|
||||||
w := NewWalker(context, "testdata/src/issue64958")
|
w := NewWalker(context, "testdata/src/issue64958")
|
||||||
pkg, err := w.importFrom("p", "", 0)
|
pkg, err := w.importFrom("p", "", 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user