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

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: Addressed comments and rebase 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
« no previous file with comments | « platform_tools/ios/bin/ios_run_skia ('k') | platform_tools/ios/bin/ios_umount » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ce4fdc6cb1fd4175f87c9acaa6cbb35f24c4c711 100755
--- a/platform_tools/ios/bin/ios_setup.sh
+++ b/platform_tools/ios/bin/ios_setup.sh
@@ -24,9 +24,6 @@ TEST_RUNNER_BUNDLE_ID="com.google.iOSShell"
# Directory with the Skia source.
SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd)
-# BuildTYPE is 'Debug' by default.
-BUILDTYPE="Debug"
-
# Provisioning profile - this needs to be set up on the local machine.
PROVISIONING_PROFILE="9e88090d-abed-4e89-b106-3eff3512d31f"
@@ -37,12 +34,11 @@ IOS_BUNDLE_ID="com.google.iOSShell"
IOS_RESULTS_DIR="results"
-if [[ $# -ge 1 ]]; then
- BUILDTYPE=$1
+# BUILDTYPE is 'Debug' by default.
+if [[ -z "$BUILDTYPE" ]]; then
+ BUILDTYPE="Debug"
fi
-set -x
-
ios_uninstall_app() {
ideviceinstaller -U "$IOS_BUNDLE_ID"
}
@@ -58,7 +54,7 @@ ios_install_app() {
cd $RET_DIR
}
-ios_rmdir() {
+ios_rm() {
local TARGET="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1"
ios_mount
@@ -73,11 +69,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 this is already mounted we unmount it.
borenet 2015/05/05 13:36:30 Nit: line ending with spaces
stephana-chromium 2015/05/05 14:30:54 Done.
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 +91,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 +109,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
}
« no previous file with comments | « platform_tools/ios/bin/ios_run_skia ('k') | platform_tools/ios/bin/ios_umount » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698