Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: platform_tools/ios/bin/ios_setup.sh

Issue 1085583006: iOS platform scripts to be used by buildbots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: platform_tools/ios/bin/ios_setup.sh
diff --git a/platform_tools/ios/bin/ios_setup.sh b/platform_tools/ios/bin/ios_setup.sh
index 5df7ac00d2cee064b8cbfe1cf711258bee512754..efffc1fd910ad618718c871517e176e5bcd2ffc3 100755
--- a/platform_tools/ios/bin/ios_setup.sh
+++ b/platform_tools/ios/bin/ios_setup.sh
@@ -37,11 +37,6 @@ IOS_BUNDLE_ID="com.google.iOSShell"
IOS_RESULTS_DIR="results"
-if [[ $# -ge 1 ]]; then
- BUILDTYPE=$1
-fi
-
-set -x
ios_uninstall_app() {
ideviceinstaller -U "$IOS_BUNDLE_ID"
@@ -58,7 +53,7 @@ ios_install_app() {
cd $RET_DIR
}
-ios_rmdir() {
+ios_rm() {
local TARGET="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1"
ios_mount
@@ -73,11 +68,19 @@ ios_mkdir() {
ios_umount
}
+ios_cat() {
+ local TARGET="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1"
+ ios_mount
+ RET="$(cat $TARGET)"
+ ios_umount
+ echo -e "$RET"
+}
+
# ios_mount: mounts the iOS device for reading or writing.
ios_mount() {
# If this is already mounted we return.
if $(mount | grep --quiet "$IOS_MOUNT_POINT"); then
- echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting."
+ >&2 echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting."
ios_umount
fi
@@ -87,7 +90,7 @@ ios_mount() {
fi
ifuse --container $TEST_RUNNER_BUNDLE_ID $IOS_MOUNT_POINT
sleep 1
- echo "Successfully mounted device."
+ >&2 echo "Successfully mounted device."
}
# ios_umount: unmounts the ios device.
@@ -105,11 +108,15 @@ ios_restart() {
# The path is relative to the 'Documents' folder on the device.
ios_pull() {
# read input params
- local IOS_SRC="$1"
+ local IOS_SRC="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1"
local HOST_DST="$2"
ios_mount
- cp -r $IOS_MOUNT_POINT/$IOS_DOCS_DIR/$IOS_SRC $HOST_DST
+ if [[ -d "${HOST_DST}" ]]; then
+ cp -r "$IOS_SRC/" "$HOST_DST"
+ else
+ cp -r "$IOS_SRC" "$HOST_DST"
+ fi
ios_umount
}

Powered by Google App Engine
This is Rietveld 408576698