aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2015-04-13 09:30:56 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2015-04-13 16:42:11 +0000
commit4af5dcb2db977ea3c2e2218be7912951b3a44113 (patch)
tree6479b102685d5ebc171de1ab5b36628974b19601 /src
parent9725f2258b27f901afbcab2e6214d30e90e82a91 (diff)
downloadgo-4af5dcb2db977ea3c2e2218be7912951b3a44113.tar.xz
iostest.bash: do not restart device by default
This is friendlier for manual runs and personal devices. Builders will pass -restart. Fixes #10333. Change-Id: Ia64c8f1660e275b5a1543d7f81f5f5efb623182f Reviewed-on: https://go-review.googlesource.com/8870 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/iostest.bash34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/iostest.bash b/src/iostest.bash
index 7a942390af..865678f1da 100755
--- a/src/iostest.bash
+++ b/src/iostest.bash
@@ -28,21 +28,23 @@ if [ "$GOARCH" == "arm" ]; then
export GOARM=7
fi
-# Reboot to make sure previous runs do not interfere with the current run.
-# It is reasonably easy for a bad program leave an iOS device in an
-# almost unusable state.
-idevicediagnostics restart
-# Initial sleep to make sure we are restarting before we start polling.
-sleep 30
-# Poll until the device has restarted.
-until idevicediagnostics diagnostics; do
- # TODO(crawshaw): replace with a test app using go_darwin_arm_exec.
- echo "waiting for idevice to come online"
- sleep 10
-done
-# Diagnostics are reported during boot before the device can start an
-# app. Wait a little longer before trying to use the device.
-sleep 30
+if [ "$1" == "-restart" ]; then
+ # Reboot to make sure previous runs do not interfere with the current run.
+ # It is reasonably easy for a bad program leave an iOS device in an
+ # almost unusable state.
+ idevicediagnostics restart
+ # Initial sleep to make sure we are restarting before we start polling.
+ sleep 30
+ # Poll until the device has restarted.
+ until idevicediagnostics diagnostics; do
+ # TODO(crawshaw): replace with a test app using go_darwin_arm_exec.
+ echo "waiting for idevice to come online"
+ sleep 10
+ done
+ # Diagnostics are reported during boot before the device can start an
+ # app. Wait a little longer before trying to use the device.
+ sleep 30
+fi
unset GOBIN
export GOROOT=$(dirname $(pwd))
@@ -51,7 +53,7 @@ export CGO_ENABLED=1
export CC_FOR_TARGET=$GOROOT/misc/ios/clangwrap.sh
# Run the build for the host bootstrap, so we can build go_darwin_arm_exec.
-# Also lets us fail early before the (slow) adb push if the build is broken.
+# Also lets us fail early before the (slow) ios-deploy if the build is broken.
./make.bash
GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH go build \