]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: convert TestGoBuildARM to the script framework
authorMichael Matloob <matloob@golang.org>
Mon, 13 Jan 2020 15:54:34 +0000 (10:54 -0500)
committerMichael Matloob <matloob@golang.org>
Thu, 27 Feb 2020 21:25:17 +0000 (21:25 +0000)
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 <jayconrod@google.com>
src/cmd/go/go_test.go
src/cmd/go/testdata/script/build_arm.txt [new file with mode: 0644]

index 89b27b90b733f93ec4197736e27eaad9a2bd644b..d95714deb922ab33fc536ff60504f19e1b9355b3 100644 (file)
@@ -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 (file)
index 0000000..ff2a364
--- /dev/null
@@ -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