aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools
diff options
context:
space:
mode:
authorGravatar stephana <stephana@google.com>2015-05-19 06:27:09 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-19 06:27:09 -0700
commit9b4b91f5c222da584bb72d5880f654ae0081454d (patch)
tree6702bf0af4281910271596fe9b11316902194d79 /platform_tools
parent2e5b4c52c59f838af0e0a2e5550dcffa4d3756cd (diff)
This allows to restart the device.
BUG=skia: TBR=borenet Review URL: https://codereview.chromium.org/1137873007
Diffstat (limited to 'platform_tools')
-rwxr-xr-xplatform_tools/ios/bin/ios_restart17
-rwxr-xr-xplatform_tools/ios/bin/ios_setup.sh1
2 files changed, 18 insertions, 0 deletions
diff --git a/platform_tools/ios/bin/ios_restart b/platform_tools/ios/bin/ios_restart
new file mode 100755
index 0000000000..6e9c00e781
--- /dev/null
+++ b/platform_tools/ios/bin/ios_restart
@@ -0,0 +1,17 @@
+#!/bin/bash
+###############################################################################
+# Copyright 2015 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+###############################################################################
+#
+# Restarts the the attached iOS device.
+#
+set -x -e
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+source $SCRIPT_DIR/ios_setup.sh
+
+ios_restart
+sleep 20
diff --git a/platform_tools/ios/bin/ios_setup.sh b/platform_tools/ios/bin/ios_setup.sh
index d9d7a2e7ae..fc6386c6b3 100755
--- a/platform_tools/ios/bin/ios_setup.sh
+++ b/platform_tools/ios/bin/ios_setup.sh
@@ -102,6 +102,7 @@ ios_umount() {
# ios_restart: restarts the iOS device.
ios_restart() {
+ ios_umount || true
idevicediagnostics restart
}