Skip to content

Commit

Permalink
Merge pull request #79 from 8W9aG/add-retry-ci
Browse files Browse the repository at this point in the history
Retry tests when they fail
  • Loading branch information
8W9aG committed Feb 2, 2016
2 parents 909f263 + 2bb7e04 commit b6ea298
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ travis_fold_open "License conformance" "Validating source files for license comp
./ci/validate_license_conformance.sh {demo/*{h,m},include/SPTDataLoader/*.h,SPTDataLoader/*.{h,m},SPTDataLoaderTests/*.{h,m}}
travis_fold_close "License conformance"


# Executing build actions
echo "Executing build actions: $BUILD_ACTIONS"
xcrun xcodebuild $BUILD_ACTIONS \
NSUnbufferedIO=YES \
-project SPTDataLoader.xcodeproj \
-scheme "$SCHEME" \
-sdk "$TEST_SDK" \
-destination "$TEST_DEST" \
$EXTRA_ARGUMENTS \
| xcpretty -c -f `xcpretty-travis-formatter`

retry_attempts=0
until [ $retry_attempts -ge 2 ]
do
xcrun xcodebuild $BUILD_ACTIONS \
NSUnbufferedIO=YES \
-project SPTDataLoader.xcodeproj \
-scheme "$SCHEME" \
-sdk "$TEST_SDK" \
-destination "$TEST_DEST" \
$EXTRA_ARGUMENTS \
| xcpretty -c -f `xcpretty-travis-formatter` && break
retry_attempts=$[$retry_attempts+1]
sleep $retry_attempts
done

# Linting
travis_fold_open "Linting" "Linting CocoaPods specification…"
Expand Down

0 comments on commit b6ea298

Please sign in to comment.