test script

This commit is contained in:
Ari Lazier 2016-01-22 13:26:37 -08:00
parent 70eb615668
commit 077d741a1f
1 changed files with 6 additions and 6 deletions

View File

@ -3,13 +3,13 @@
set -o pipefail set -o pipefail
set -e set -e
while pgrep -q Simulator; do #while pgrep -q Simulator; do
# Kill all the current simulator processes as they may be from a # Kill all the current simulator processes as they may be from a
# different Xcode version # different Xcode version
pkill Simulator 2>/dev/null || true # pkill Simulator 2>/dev/null || true
# CoreSimulatorService doesn't exit when sent SIGTERM # CoreSimulatorService doesn't exit when sent SIGTERM
pkill -9 Simulator 2>/dev/null || true # pkill -9 Simulator 2>/dev/null || true
done # done
DESTINATION="-destination id=$(xcrun simctl list devices | grep -v unavailable | grep -m 1 -o '[0-9A-F\-]\{36\}')" DESTINATION="-destination id=$(xcrun simctl list devices | grep -v unavailable | grep -m 1 -o '[0-9A-F\-]\{36\}')"
@ -23,7 +23,7 @@ function start_packager()
sh ./node_modules/react-native/packager/packager.sh | tee $PACKAGER_OUT & sh ./node_modules/react-native/packager/packager.sh | tee $PACKAGER_OUT &
while :; while :;
do do
if grep -Fx "React packager ready." $PACKAGER_OUT if grep -Fxq "React packager ready." $PACKAGER_OUT
then then
break break
else else
@ -90,7 +90,7 @@ elif [ "$TARGET" = "react-tests-android" ]; then
adb logcat | tee $LOGCAT_OUT & adb logcat | tee $LOGCAT_OUT &
while :; while :;
do do
if grep "FILE WRITTEN!!" $LOGCAT_OUT if grep -q "FILE WRITTEN!!" $LOGCAT_OUT
then then
break break
else else