Skip to content

Commit

Permalink
internal/counter: skip tests on solaris, android, and GOARCH=386
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hyangah committed Jun 23, 2023
1 parent 09c2e0c commit de303cd
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions internal/counter/counter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,22 @@ import (
"golang.org/x/telemetry/internal/mmap"
)

func TestBasic(t *testing.T) {
if runtime.GOOS == "openbsd" || runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
func skipIfUnsupportedPlatform(t *testing.T) {
t.Helper()
switch runtime.GOOS {
case "openbsd", "js", "wasip1", "solaris", "android":
// BUGS: #60614 - openbsd, #60967 - android , #60968 - solaris #60970 - solaris #60971 - wasip1)
t.Skip("broken for openbsd etc")
}
if runtime.GOARCH == "386" {
// BUGS: #60615 #60692 #60965 #60967
t.Skip("broken for GOARCH 386")
}
}

func TestBasic(t *testing.T) {
skipIfUnsupportedPlatform(t)

t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
setup(t)
defer restore()
Expand Down Expand Up @@ -75,9 +87,7 @@ func close(f *file) {
}

func TestLarge(t *testing.T) {
if runtime.GOOS == "openbsd" || runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
t.Skip("broken for openbsd etc")
}
skipIfUnsupportedPlatform(t)
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
setup(t)
defer restore()
Expand Down Expand Up @@ -123,6 +133,8 @@ func TestLarge(t *testing.T) {
}

func TestRepeatedNew(t *testing.T) {
skipIfUnsupportedPlatform(t)

t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
setup(t)
defer restore()
Expand Down Expand Up @@ -161,6 +173,8 @@ func hexDump(data []byte) string {
}

func TestNewFile(t *testing.T) {
skipIfUnsupportedPlatform(t)

t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
setup(t)
defer restore()
Expand Down Expand Up @@ -226,6 +240,8 @@ func TestNewFile(t *testing.T) {
}

func TestRotate(t *testing.T) {
skipIfUnsupportedPlatform(t)

t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
year, month, day := time.Now().Date()
now := time.Date(year, month, day, 0, 0, 0, 0, time.UTC)
Expand Down Expand Up @@ -281,6 +297,7 @@ func TestRotate(t *testing.T) {
}

func TestStack(t *testing.T) {
skipIfUnsupportedPlatform(t)
t.Logf("GOOS %s GARCH %s", runtime.GOOS, runtime.GOARCH)
setup(t)
defer restore()
Expand Down

0 comments on commit de303cd

Please sign in to comment.