Skip to content

Commit de303cd

Browse files
committed
internal/counter: skip tests on solaris, android, and GOARCH=386
Updates golang/go#60615 Updates golang/go#60692 Updates golang/go#60965 Updates golang/go#60967 Updates golang/go#60968 Updates golang/go#60970 Updates golang/go#60971 Change-Id: Ifb0320c279e91185ab04c3efa6bf20f2c141dbe1 Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/505580 Reviewed-by: Jamal Carvalho <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
1 parent 09c2e0c commit de303cd

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

internal/counter/counter_test.go

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,22 @@ import (
2424
"golang.org/x/telemetry/internal/mmap"
2525
)
2626

27-
func TestBasic(t *testing.T) {
28-
if runtime.GOOS == "openbsd" || runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
27+
func skipIfUnsupportedPlatform(t *testing.T) {
28+
t.Helper()
29+
switch runtime.GOOS {
30+
case "openbsd", "js", "wasip1", "solaris", "android":
31+
// BUGS: #60614 - openbsd, #60967 - android , #60968 - solaris #60970 - solaris #60971 - wasip1)
2932
t.Skip("broken for openbsd etc")
3033
}
34+
if runtime.GOARCH == "386" {
35+
// BUGS: #60615 #60692 #60965 #60967
36+
t.Skip("broken for GOARCH 386")
37+
}
38+
}
39+
40+
func TestBasic(t *testing.T) {
41+
skipIfUnsupportedPlatform(t)
42+
3143
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
3244
setup(t)
3345
defer restore()
@@ -75,9 +87,7 @@ func close(f *file) {
7587
}
7688

7789
func TestLarge(t *testing.T) {
78-
if runtime.GOOS == "openbsd" || runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
79-
t.Skip("broken for openbsd etc")
80-
}
90+
skipIfUnsupportedPlatform(t)
8191
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
8292
setup(t)
8393
defer restore()
@@ -123,6 +133,8 @@ func TestLarge(t *testing.T) {
123133
}
124134

125135
func TestRepeatedNew(t *testing.T) {
136+
skipIfUnsupportedPlatform(t)
137+
126138
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
127139
setup(t)
128140
defer restore()
@@ -161,6 +173,8 @@ func hexDump(data []byte) string {
161173
}
162174

163175
func TestNewFile(t *testing.T) {
176+
skipIfUnsupportedPlatform(t)
177+
164178
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
165179
setup(t)
166180
defer restore()
@@ -226,6 +240,8 @@ func TestNewFile(t *testing.T) {
226240
}
227241

228242
func TestRotate(t *testing.T) {
243+
skipIfUnsupportedPlatform(t)
244+
229245
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
230246
year, month, day := time.Now().Date()
231247
now := time.Date(year, month, day, 0, 0, 0, 0, time.UTC)
@@ -281,6 +297,7 @@ func TestRotate(t *testing.T) {
281297
}
282298

283299
func TestStack(t *testing.T) {
300+
skipIfUnsupportedPlatform(t)
284301
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
285302
setup(t)
286303
defer restore()

0 commit comments

Comments
 (0)