Skip to content

Commit a35af46

Browse files
committed
Skip unsupported architectures
1 parent 16b2a63 commit a35af46

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

internal/testhelpers/tagsuite/tagsuite.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package tagsuite
22

33
import (
44
"os"
5+
"runtime"
56
"strings"
67

78
"github.com/thoas/go-funk"
@@ -113,3 +114,10 @@ func (suite *Suite) OnlyRunForTags(tags ...string) {
113114

114115
suite.T().Skipf("Run only if any of the following tags are set: %s", strings.Join(tags, ", "))
115116
}
117+
118+
// SkipUnsupportedArchitectures will skip tests for unsupported system architectures
119+
func (suite *Suite) SkipUnsupportedArchitectures() {
120+
if runtime.GOOS == "linux" && runtime.GOARCH == "arm64" {
121+
suite.T().Skip("Skipping test on Linux/arm64 - platform not configured")
122+
}
123+
}

test/integration/deploy_int_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func (suite *DeployIntegrationTestSuite) deploy(ts *e2e.Session, prj string, tar
6868

6969
func (suite *DeployIntegrationTestSuite) TestDeployPerl() {
7070
suite.OnlyRunForTags(tagsuite.Perl, tagsuite.Deploy)
71+
suite.SkipUnsupportedArchitectures()
7172
if !e2e.RunningOnCI() {
7273
suite.T().Skipf("Skipping DeployIntegrationTestSuite when not running on CI, as it modifies bashrc/registry")
7374
}
@@ -144,6 +145,7 @@ func (suite *DeployIntegrationTestSuite) checkSymlink(name string, binDir, targe
144145

145146
func (suite *DeployIntegrationTestSuite) TestDeployPython() {
146147
suite.OnlyRunForTags(tagsuite.Deploy, tagsuite.Python, tagsuite.Critical)
148+
suite.SkipUnsupportedArchitectures()
147149
if !e2e.RunningOnCI() {
148150
suite.T().Skipf("Skipping DeployIntegrationTestSuite when not running on CI, as it modifies bashrc/registry")
149151
}
@@ -210,6 +212,7 @@ func (suite *DeployIntegrationTestSuite) TestDeployPython() {
210212

211213
func (suite *DeployIntegrationTestSuite) TestDeployInstall() {
212214
suite.OnlyRunForTags(tagsuite.Deploy)
215+
suite.SkipUnsupportedArchitectures()
213216
if !e2e.RunningOnCI() {
214217
suite.T().Skipf("Skipping DeployIntegrationTestSuite when not running on CI, as it modifies bashrc/registry")
215218
}
@@ -243,6 +246,7 @@ func (suite *DeployIntegrationTestSuite) InstallAndAssert(ts *e2e.Session, targe
243246

244247
func (suite *DeployIntegrationTestSuite) TestDeployConfigure() {
245248
suite.OnlyRunForTags(tagsuite.Deploy)
249+
suite.SkipUnsupportedArchitectures()
246250
if !e2e.RunningOnCI() {
247251
suite.T().Skipf("Skipping TestDeployConfigure when not running on CI, as it modifies bashrc/registry")
248252
}
@@ -311,6 +315,7 @@ func (suite *DeployIntegrationTestSuite) AssertConfig(ts *e2e.Session, targetID
311315

312316
func (suite *DeployIntegrationTestSuite) TestDeploySymlink() {
313317
suite.OnlyRunForTags(tagsuite.Deploy)
318+
suite.SkipUnsupportedArchitectures()
314319
if runtime.GOOS != "windows" && !e2e.RunningOnCI() {
315320
suite.T().Skipf("Skipping TestDeploySymlink when not running on CI, as it modifies PATH")
316321
}
@@ -348,6 +353,7 @@ func (suite *DeployIntegrationTestSuite) TestDeploySymlink() {
348353

349354
func (suite *DeployIntegrationTestSuite) TestDeployReport() {
350355
suite.OnlyRunForTags(tagsuite.Deploy)
356+
suite.SkipUnsupportedArchitectures()
351357
ts := e2e.New(suite.T(), false)
352358
defer ts.Close()
353359

@@ -376,6 +382,7 @@ func (suite *DeployIntegrationTestSuite) TestDeployReport() {
376382

377383
func (suite *DeployIntegrationTestSuite) TestDeployTwice() {
378384
suite.OnlyRunForTags(tagsuite.Deploy)
385+
suite.SkipUnsupportedArchitectures()
379386
if runtime.GOOS == "darwin" || !e2e.RunningOnCI() {
380387
suite.T().Skipf("Skipping TestDeployTwice when not running on CI or on MacOS, as it modifies PATH")
381388
}
@@ -411,6 +418,7 @@ func (suite *DeployIntegrationTestSuite) TestDeployTwice() {
411418

412419
func (suite *DeployIntegrationTestSuite) TestDeployUninstall() {
413420
suite.OnlyRunForTags(tagsuite.Deploy)
421+
suite.SkipUnsupportedArchitectures()
414422
if !e2e.RunningOnCI() {
415423
suite.T().Skipf("Skipping TestDeployUninstall when not running on CI, as it modifies bashrc/registry")
416424
}

test/integration/use_int_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type UseIntegrationTestSuite struct {
2323

2424
func (suite *UseIntegrationTestSuite) TestUse() {
2525
suite.OnlyRunForTags(tagsuite.Use)
26+
suite.SkipUnsupportedArchitectures()
2627

2728
ts := e2e.New(suite.T(), false)
2829
defer ts.Close()
@@ -77,6 +78,7 @@ func (suite *UseIntegrationTestSuite) TestUse() {
7778

7879
func (suite *UseIntegrationTestSuite) TestUseCwd() {
7980
suite.OnlyRunForTags(tagsuite.Use)
81+
suite.SkipUnsupportedArchitectures()
8082

8183
ts := e2e.New(suite.T(), false)
8284
defer ts.Close()
@@ -107,6 +109,7 @@ func (suite *UseIntegrationTestSuite) TestUseCwd() {
107109

108110
func (suite *UseIntegrationTestSuite) TestReset() {
109111
suite.OnlyRunForTags(tagsuite.Use)
112+
suite.SkipUnsupportedArchitectures()
110113

111114
ts := e2e.New(suite.T(), false)
112115
defer ts.Close()
@@ -157,6 +160,7 @@ func (suite *UseIntegrationTestSuite) TestReset() {
157160

158161
func (suite *UseIntegrationTestSuite) TestShow() {
159162
suite.OnlyRunForTags(tagsuite.Use)
163+
suite.SkipUnsupportedArchitectures()
160164

161165
ts := e2e.New(suite.T(), false)
162166
defer ts.Close()
@@ -211,6 +215,7 @@ func (suite *UseIntegrationTestSuite) TestShow() {
211215

212216
func (suite *UseIntegrationTestSuite) TestSetupNotice() {
213217
suite.OnlyRunForTags(tagsuite.Use)
218+
suite.SkipUnsupportedArchitectures()
214219

215220
ts := e2e.New(suite.T(), false)
216221
defer ts.Close()
@@ -233,6 +238,8 @@ func (suite *UseIntegrationTestSuite) TestSetupNotice() {
233238

234239
func (suite *UseIntegrationTestSuite) TestJSON() {
235240
suite.OnlyRunForTags(tagsuite.Use, tagsuite.JSON)
241+
suite.SkipUnsupportedArchitectures()
242+
236243
ts := e2e.New(suite.T(), false)
237244
defer ts.Close()
238245

0 commit comments

Comments
 (0)