]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: execute cgo_stdio and cgo_life as host tests
authorBryan C. Mills <bcmills@google.com>
Wed, 27 Feb 2019 18:02:04 +0000 (13:02 -0500)
committerBryan C. Mills <bcmills@google.com>
Wed, 27 Feb 2019 18:18:04 +0000 (18:18 +0000)
Now that these tests are written in Go, they must be run in host mode
in order to be able to exec `go run` as a subprocess.

Updates #30228

Change-Id: Ibedf86a8e18ae1b6f583c1bbdcb99d19c8e01744
Reviewed-on: https://go-review.googlesource.com/c/164137
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/dist/test.go

index 025da74a15c3e069108e80d08a860392a111d45f..68401e546b4e5c07f1530ffc7712954276985528 100644 (file)
@@ -606,22 +606,8 @@ func (t *tester) registerTests() {
 
        if t.cgoEnabled && !t.iOS() {
                // Disabled on iOS. golang.org/issue/15919
-               t.tests = append(t.tests, distTest{
-                       name:    "cgo_stdio",
-                       heading: "../misc/cgo/stdio",
-                       fn: func(dt *distTest) error {
-                               t.addCmd(dt, "misc/cgo/stdio", t.goTest(), t.timeout(120))
-                               return nil
-                       },
-               })
-               t.tests = append(t.tests, distTest{
-                       name:    "cgo_life",
-                       heading: "../misc/cgo/life",
-                       fn: func(dt *distTest) error {
-                               t.addCmd(dt, "misc/cgo/life", t.goTest(), t.timeout(120))
-                               return nil
-                       },
-               })
+               t.registerHostTest("cgo_stdio", "../misc/cgo/stdio", "misc/cgo/stdio", ".")
+               t.registerHostTest("cgo_life", "../misc/cgo/life", "misc/cgo/life", ".")
                fortran := os.Getenv("FC")
                if fortran == "" {
                        fortran, _ = exec.LookPath("gfortran")