Skip to content

Update travis test to retry if error is 65 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

set -eo pipefail

EXIT_STATUS=0

(xcodebuild \
xcodebuild \
-workspace Example/Firebase.xcworkspace \
-scheme AllUnitTests \
-sdk iphonesimulator \
Expand All @@ -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