Fix tests runner

This commit is contained in:
Alex Kotliarskyi
2015-04-22 16:04:06 -07:00
parent bd165e86e1
commit 5d5ec80452
2 changed files with 30 additions and 11 deletions

29
scripts/objc-test.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
set -e
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT=$(dirname $SCRIPTS)
export REACT_PACKAGER_LOG="$ROOT/server.log"
cd $ROOT
function cleanup {
EXIT_CODE=$?
set +e
if [ $EXIT_CODE -ne 0 ];
then
WATCHMAN_LOGS=/usr/local/Cellar/watchman/3.1/var/run/watchman/$USER.log
[ -f $WATCHMAN_LOGS ] && cat $WATCHMAN_LOGS
[ -f $REACT_PACKAGER_LOG ] && cat $REACT_PACKAGER_LOG
fi
}
trap cleanup EXIT
xctool \
-project Examples/UIExplorer/UIExplorer.xcodeproj \
-scheme UIExplorer -sdk iphonesimulator8.1 \
test