From c40914b7265b6b73053e21fe595fcde2aec9dcde Mon Sep 17 00:00:00 2001 From: Michael Matloob Date: Mon, 13 Jan 2020 10:54:34 -0500 Subject: [PATCH] cmd/go: convert TestGoBuildARM to the script framework 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 --- src/cmd/go/go_test.go | 20 -------------------- src/cmd/go/testdata/script/build_arm.txt | 13 +++++++++++++ 2 files changed, 13 insertions(+), 20 deletions(-) create mode 100644 src/cmd/go/testdata/script/build_arm.txt diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 89b27b90b7..d95714deb9 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -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) diff --git a/src/cmd/go/testdata/script/build_arm.txt b/src/cmd/go/testdata/script/build_arm.txt new file mode 100644 index 0000000000..ff2a36456e --- /dev/null +++ b/src/cmd/go/testdata/script/build_arm.txt @@ -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() {} \ No newline at end of file