]> Cypherpunks repositories - gostls13.git/commitdiff
run.bash: disable tests that don't (yet) like running off the host
authorDavid Crawshaw <david.crawshaw@zentus.com>
Tue, 8 Jul 2014 22:41:07 +0000 (18:41 -0400)
committerDavid Crawshaw <david.crawshaw@zentus.com>
Tue, 8 Jul 2014 22:41:07 +0000 (18:41 -0400)
LGTM=bradfitz, minux
R=bradfitz, golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/110940043

src/run.bash

index 128f15c39556082fdd4c7e3f645f999dc99086dc..d13161e9de1a5a283a3b993d60793dee53b8e7a2 100755 (executable)
@@ -99,6 +99,13 @@ xcd() {
 # Strictly speaking, the test may be unnecessary on the final command of
 # the subshell, but it aids later editing and may avoid future bash bugs.
 
+if [ "$GOOS" == "android" ]; then
+       # Disable cgo tests on android.
+       # They are not designed to run off the host.
+       # golang.org/issue/8345
+       CGO_ENABLED=0
+fi
+
 [ "$CGO_ENABLED" != 1 ] ||
 [ "$GOHOSTOS" == windows ] ||
 (xcd ../misc/cgo/stdio
@@ -128,7 +135,7 @@ darwin-386 | darwin-amd64)
        *) go test -ldflags '-linkmode=external'  || exit 1;;
        esac
        ;;
-dragonfly-386 | dragonfly-amd64 | freebsd-386 | freebsd-amd64 | freebsd-arm | linux-386 | linux-amd64 | linux-arm | netbsd-386 | netbsd-amd64)
+android-arm | dragonfly-386 | dragonfly-amd64 | freebsd-386 | freebsd-amd64 | freebsd-arm | linux-386 | linux-amd64 | linux-arm | netbsd-386 | netbsd-amd64)
        go test -ldflags '-linkmode=external' || exit 1
        go test -ldflags '-linkmode=auto' ../testtls || exit 1
        go test -ldflags '-linkmode=external' ../testtls || exit 1
@@ -182,16 +189,19 @@ go run main.go || exit 1
 ) || exit $?
 
 [ "$GOOS" == nacl ] ||
+[ "$GOOS" == android ] ||
 (xcd ../doc/progs
 time ./run || exit 1
 ) || exit $?
 
+[ "$GOOS" == android ] ||
 [ "$GOOS" == nacl ] ||
 [ "$GOARCH" == arm ] ||  # uses network, fails under QEMU
 (xcd ../doc/articles/wiki
 ./test.bash || exit 1
 ) || exit $?
 
+[ "$GOOS" == android ] ||
 [ "$GOOS" == nacl ] ||
 (xcd ../doc/codewalk
 time ./run || exit 1
@@ -203,6 +213,7 @@ time ./run || exit 1
 time ./timing.sh -test || exit 1
 ) || exit $?
 
+[ "$GOOS" == android ] || # TODO(crawshaw): get this working
 [ "$GOOS" == openbsd ] || # golang.org/issue/5057
 (
 echo
@@ -210,6 +221,7 @@ echo '#' ../test/bench/go1
 go test ../test/bench/go1 || exit 1
 ) || exit $?
 
+[ "$GOOS" == android ] ||
 (xcd ../test
 unset GOMAXPROCS
 GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH go build -o runtest run.go || exit 1
@@ -217,6 +229,7 @@ time ./runtest || exit 1
 rm -f runtest
 ) || exit $?
 
+[ "$GOOS" == android ] ||
 [ "$GOOS" == nacl ] ||
 (
 echo