Skip to content

Commit

Permalink
cmd/go: convert TestGoBuildARM to the script framework
Browse files Browse the repository at this point in the history
Part of converting all tests to script framework to improve
test parallelism.

Updates #36320
Updates #17751

Change-Id: If1e591f28d6399a07b37ed7f4a1419bf7cd915eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/214425
Reviewed-by: Jay Conrod <[email protected]>
  • Loading branch information
matloob committed Feb 27, 2020
1 parent 1c4e515 commit c40914b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/cmd/go/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2117,26 +2117,6 @@ func TestGoBuildGOPATHOrderBroken(t *testing.T) {
tg.run("install", "-x", "bar")
}

func TestGoBuildARM(t *testing.T) {
if testing.Short() {
t.Skip("skipping cross-compile in short mode")
}

tg := testgo(t)
defer tg.cleanup()

tg.makeTempdir()
tg.cd(tg.path("."))

tg.setenv("GOARCH", "arm")
tg.setenv("GOOS", "linux")
tg.setenv("GOARM", "5")
tg.tempFile("hello.go", `package main
func main() {}`)
tg.run("build", "hello.go")
tg.grepStderrNot("unable to find math.a", "did not build math.a correctly")
}

// For issue 14337.
func TestParallelTest(t *testing.T) {
tooSlow(t)
Expand Down
13 changes: 13 additions & 0 deletions src/cmd/go/testdata/script/build_arm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[short] skip 'skipping cross-compile in short mode'

env GOARCH=arm
env GOOS=linux
env GOARM=5

go build hello.go
! stderr 'unable to find math.a'

-- hello.go --
package main

func main() {}

0 comments on commit c40914b

Please sign in to comment.