# 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
*) 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
) || 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
time ./timing.sh -test || exit 1
) || exit $?
+[ "$GOOS" == android ] || # TODO(crawshaw): get this working
[ "$GOOS" == openbsd ] || # golang.org/issue/5057
(
echo
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
rm -f runtest
) || exit $?
+[ "$GOOS" == android ] ||
[ "$GOOS" == nacl ] ||
(
echo