From 03a7569ea6952b47c3f25294e94cb3abf1877d5d Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 7 Jun 2016 13:06:24 +0200 Subject: Rerun failed spinach tests --- scripts/prepare_build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh index 247383aa46c..d6fb1a34e8c 100755 --- a/scripts/prepare_build.sh +++ b/scripts/prepare_build.sh @@ -1,12 +1,16 @@ #!/bin/bash retry() { - for i in $(seq 1 3); do + if eval "$@"; then + return 0 + fi + + for i in 2 1; do + sleep 3s + echo "Retrying $i..." if eval "$@"; then return 0 fi - sleep 3s - echo "Retrying..." done return 1 } -- cgit v1.2.1