Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: skip a case in TestClusterTables/ForClusterServerInfo on mac M1 #29933

Merged
merged 1 commit into from
Nov 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions infoschema/cluster_tables_serial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ func SubTestForClusterServerInfo(s *clusterTablesSuite) func(*testing.T) {
defer func() { require.NoError(t, failpoint.Disable(fpName)) }()

cases := []struct {
sql string
types set.StringSet
addrs set.StringSet
names set.StringSet
skipOnOS string
sql string
types set.StringSet
addrs set.StringSet
names set.StringSet
skipOnDist set.StringSet
}{
{
sql: "select * from information_schema.CLUSTER_LOAD;",
Expand All @@ -115,7 +115,8 @@ func SubTestForClusterServerInfo(s *clusterTablesSuite) func(*testing.T) {
addrs: set.NewStringSet(s.listenAddr),
names: set.NewStringSet("cpu", "memory", "net", "disk"),
// The sysutil package will filter out all disk don't have /dev prefix.
skipOnOS: "windows",
// gopsutil cpu.Info will fail on mac M1
skipOnDist: set.NewStringSet("windows", "darwin/arm64"),
},
{
sql: "select * from information_schema.CLUSTER_SYSTEMINFO;",
Expand All @@ -126,12 +127,12 @@ func SubTestForClusterServerInfo(s *clusterTablesSuite) func(*testing.T) {
// Because the underlying implementation use `sysctl` command to get the result
// and there is no such command on windows.
// https://github.com/pingcap/sysutil/blob/2bfa6dc40bcd4c103bf684fba528ae4279c7ec9f/system_info.go#L50
skipOnOS: "windows",
skipOnDist: set.NewStringSet("windows"),
},
}

for _, cas := range cases {
if cas.skipOnOS == runtime.GOOS {
if cas.skipOnDist.Exist(runtime.GOOS+"/"+runtime.GOARCH) || cas.skipOnDist.Exist(runtime.GOOS) {
continue
}

Expand Down