diff options
Diffstat (limited to 'Firestore/test.sh')
-rwxr-xr-x | Firestore/test.sh | 54 |
1 files changed, 4 insertions, 50 deletions
diff --git a/Firestore/test.sh b/Firestore/test.sh index 7be70d0..50c6c7c 100755 --- a/Firestore/test.sh +++ b/Firestore/test.sh @@ -13,54 +13,8 @@ set -euo pipefail -FIRESTORE_DIR=$(dirname "${BASH_SOURCE[0]}") +firestore_dir=$(dirname "${BASH_SOURCE[0]}") +scripts_dir="$firestore_dir/../scripts" -test_iOS() { - xcodebuild \ - -workspace "$FIRESTORE_DIR/Example/Firestore.xcworkspace" \ - -scheme Firestore_Tests \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 7' \ - build \ - test \ - ONLY_ACTIVE_ARCH=YES \ - CODE_SIGNING_REQUIRED=NO \ - | xcpretty - - xcodebuild \ - -workspace "$FIRESTORE_DIR/Example/Firestore.xcworkspace" \ - -scheme SwiftBuildTest \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 7' \ - build \ - ONLY_ACTIVE_ARCH=YES \ - CODE_SIGNING_REQUIRED=NO \ - | xcpretty -} - -test_CMake() { - echo "cpu core: $(sysctl -n hw.ncpu)" - echo "prepare cmake build" && \ - mkdir -p build && \ - cd build && \ - cmake .. || \ - exit 1 - - echo "cmake build and test" && \ - make -j $(sysctl -n hw.ncpu) all || \ - exit 2 -} - -test_iOS; RESULT=$? -if [[ $RESULT == 65 ]]; then - echo "xcodebuild exited with 65, retrying" - sleep 5 - - test_iOS; RESULT=$? -fi - -if [ $RESULT != 0 ]; then exit $RESULT; fi - -test_CMake; RESULT=$? - -if [ $RESULT != 0 ]; then exit $RESULT; fi +$scripts_dir/build.sh Firestore iOS +$scripts_dir/build.sh Firestore macOS cmake |