OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ############################################################################### | 2 ############################################################################### |
3 # Copyright 2015 Google Inc. | 3 # Copyright 2015 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 ############################################################################### | 7 ############################################################################### |
8 # | 8 # |
9 # ios_setup.sh: Sets environment variables used by other iOS scripts. | 9 # ios_setup.sh: Sets environment variables used by other iOS scripts. |
10 | 10 |
11 # File system location where we mount the ios devices. | 11 # File system location where we mount the ios devices. |
12 IOS_MOUNT_POINT="/tmp/mnt_iosdevice" | 12 IOS_MOUNT_POINT="/tmp/mnt_iosdevice" |
13 | 13 |
14 # Location on the ios device where all data are stored. This is | 14 # Location on the ios device where all data are stored. This is |
15 # relative to the mount point. | 15 # relative to the mount point. |
16 IOS_DOCS_DIR="Documents" | 16 IOS_DOCS_DIR="Documents" |
17 | 17 |
18 # Temporary location to assemble the app into an .ipa package. | 18 # Temporary location to assemble the app into an .ipa package. |
19 IOS_PCKG_DIR="/tmp/ios_pckg" | 19 IOS_PCKG_DIR="/tmp/ios_pckg" |
20 | 20 |
21 # Bundle id of the app that runs the tests. | |
22 TEST_RUNNER_BUNDLE_ID="com.google.iOSShell" | |
23 | |
24 # Directory with the Skia source. | 21 # Directory with the Skia source. |
25 SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd) | 22 SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd) |
26 | 23 |
27 # Provisioning profile - this needs to be set up on the local machine. | 24 # Provisioning profile - this needs to be set up on the local machine. |
28 PROVISIONING_PROFILE="" | 25 PROVISIONING_PROFILE="" |
29 | 26 |
30 # Code Signing identity - this needs to be set up on the local machine. | 27 # Code Signing identity - this needs to be set up on the local machine. |
31 CODE_SIGN_IDENTITY="iPhone Developer" | 28 CODE_SIGN_IDENTITY="iPhone Developer" |
32 | 29 |
33 IOS_BUNDLE_ID="com.google.iOSShell" | 30 IOS_BUNDLE_ID="com.google.iOSShell.`hostname | md5`" |
34 | 31 |
35 IOS_RESULTS_DIR="results" | 32 IOS_RESULTS_DIR="results" |
36 | 33 |
37 # BUILDTYPE is 'Debug' by default. | 34 # BUILDTYPE is 'Debug' by default. |
38 if [[ -z "$BUILDTYPE" ]]; then | 35 if [[ -z "$BUILDTYPE" ]]; then |
39 BUILDTYPE="Debug" | 36 BUILDTYPE="Debug" |
40 fi | 37 fi |
41 | 38 |
42 # Out dir is $SKIA_SRC_DIR/out by default. | 39 # Out dir is $SKIA_SRC_DIR/out by default. |
43 if [[ -z "$SKIA_OUT" ]]; then | 40 if [[ -z "$SKIA_OUT" ]]; then |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 # If this is already mounted we unmount it. | 84 # If this is already mounted we unmount it. |
88 if $(mount | grep --quiet "$IOS_MOUNT_POINT"); then | 85 if $(mount | grep --quiet "$IOS_MOUNT_POINT"); then |
89 >&2 echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting." | 86 >&2 echo "Device already mounted at: $IOS_MOUNT_POINT - Unmounting." |
90 ios_umount || true | 87 ios_umount || true |
91 fi | 88 fi |
92 | 89 |
93 # Ensure there is a mount directory. | 90 # Ensure there is a mount directory. |
94 if [[ ! -d "$IOS_MOUNT_POINT" ]]; then | 91 if [[ ! -d "$IOS_MOUNT_POINT" ]]; then |
95 mkdir -p $IOS_MOUNT_POINT | 92 mkdir -p $IOS_MOUNT_POINT |
96 fi | 93 fi |
97 ifuse --container $TEST_RUNNER_BUNDLE_ID $IOS_MOUNT_POINT | 94 ifuse --container $IOS_BUNDLE_ID $IOS_MOUNT_POINT |
98 sleep 1 | 95 sleep 1 |
99 >&2 echo "Successfully mounted device." | 96 >&2 echo "Successfully mounted device." |
100 } | 97 } |
101 | 98 |
102 # ios_umount: unmounts the ios device. | 99 # ios_umount: unmounts the ios device. |
103 ios_umount() { | 100 ios_umount() { |
104 umount $IOS_MOUNT_POINT | 101 umount $IOS_MOUNT_POINT |
105 sleep 1 | 102 sleep 1 |
106 } | 103 } |
107 | 104 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 # adb_push_if_needed $HOST_SRC $ANDROID_DST | 181 # adb_push_if_needed $HOST_SRC $ANDROID_DST |
185 # else | 182 # else |
186 # echo -n "$ANDROID_DST " | 183 # echo -n "$ANDROID_DST " |
187 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 184 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
188 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 185 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
189 # fi | 186 # fi |
190 # fi | 187 # fi |
191 # } | 188 # } |
192 | 189 |
193 # setup_device "${DEVICE_ID}" | 190 # setup_device "${DEVICE_ID}" |
OLD | NEW |