diff options
author | Ibrahim Ulukaya <ulukaya@gmail.com> | 2017-05-19 17:26:47 -0400 |
---|---|---|
committer | Paul Beusterien <paulbeusterien@google.com> | 2017-05-19 14:26:47 -0700 |
commit | 7739c2a97f50fd2fed294602c4459d41ff719387 (patch) | |
tree | 1c07d3a07965e07b87b337bfcc0aeeb3d0384e85 /test.sh | |
parent | f2765ff914968c417955fb2a84cd7bf33d274da1 (diff) |
Update travis test to retry if error is 65 (#20)
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -13,9 +13,7 @@ set -eo pipefail -EXIT_STATUS=0 - -(xcodebuild \ +xcodebuild \ -workspace Example/Firebase.xcworkspace \ -scheme AllUnitTests \ -sdk iphonesimulator \ @@ -24,6 +22,21 @@ EXIT_STATUS=0 test \ ONLY_ACTIVE_ARCH=YES \ CODE_SIGNING_REQUIRED=NO \ - | xcpretty) || EXIT_STATUS=$? + | xcpretty - exit $EXIT_STATUS +RESULT=$? +if [ $RESULT == 65 ]; then + echo "xcodebuild exited with 65, retrying" + xcodebuild \ + -workspace Example/Firebase.xcworkspace \ + -scheme AllUnitTests \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 7' \ + build \ + test \ + ONLY_ACTIVE_ARCH=YES \ + CODE_SIGNING_REQUIRED=NO \ + | xcpretty +else + exit $RESULT +fi |