Created
April 25, 2018 04:27
-
-
Save cancerberoSgx/4c2e768066c8f190f97399f87aac5868 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage examle: | |
# $ time sh testing/repeatUntilFails.sh "npm run test-nobuild" | |
counter=0 | |
while true; do | |
eval $1 | |
if [[ "$?" -ne 0 ]]; then | |
echo | |
echo "*******" | |
echo " * FAILURE at loop #"$counter | |
echo "*******" | |
echo | |
exit 1 | |
fi | |
counter=$((counter+1)) | |
echo | |
echo "*******" | |
echo " * TIME: "$counter | |
echo "*******" | |
echo | |
sleep 2s | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment