aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/objc
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-07-23 16:07:08 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-07-25 11:41:24 +0000
commitbcb3eb628b4170638db361f91b9056e1bbb72bc0 (patch)
treeb056854c775fdf12ce881dd32ade04850264b54d /tools/objc
parent6d34e4b7ace741e53d7899e090e303a5f92b274e (diff)
Description redacted.
-- MOS_MIGRATED_REVID=128258430
Diffstat (limited to 'tools/objc')
-rw-r--r--tools/objc/ios_runner.sh.mac_template19
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/objc/ios_runner.sh.mac_template b/tools/objc/ios_runner.sh.mac_template
index d7141dc9f1..785d693434 100644
--- a/tools/objc/ios_runner.sh.mac_template
+++ b/tools/objc/ios_runner.sh.mac_template
@@ -74,7 +74,7 @@ function exit_when_app_not_running() {
# $1: the simulator ID to boot
function wait_for_sim_to_boot() {
i=0
- while [ "${i}" -lt 10 ]; do
+ while [ "${i}" -lt 60 ]; do
# The expected output of "xcrun simctl list" is like:
# -- iOS 8.4 --
# iPhone 5s (E946FA1C-26AB-465C-A7AC-24750D520BEA) (Shutdown)
@@ -88,7 +88,8 @@ function wait_for_sim_to_boot() {
sleep 1
i=$(($i+1))
done
- echo "Failed to launch the simulator"
+ echo "Failed to launch the simulator. The existing simulators are:"
+ xcrun simctl list
exit 1
}
@@ -178,6 +179,20 @@ echo "Start the app ${BUNDLE_ID} on ${TEST_DEVICE_ID}."
tail -f "${RUN_LOG}" &
exit_when_app_not_running "${IOS_PID}" "$!"
+# Wait for a while for the system.log to be updated.
+sleep 5
+
+if [ ! -f "${SYSTEM_LOG}" ];then
+ output=$(cat "${RUN_LOG}")
+ # If there's no system.log or output, might be a crash.
+ if [ -z "${output}" ];then
+ echo "no output or system.log"
+ exit 1
+ else
+ exit 0
+ fi
+fi
+
# Check the system.log to see if there was an abnormal exit.
readonly ABNORMAL_EXIT_MSG=$(cat "${SYSTEM_LOG}" | \
grep "com.apple.CoreSimulator.SimDevice.${TEST_DEVICE_ID}.launchd_sim" | \