diff options
Diffstat (limited to 'abuild.in')
-rw-r--r-- | abuild.in | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1533,6 +1533,9 @@ build_abuildrepo() { if options_has "checkroot"; then _check=check_fakeroot fi + if options_has "checkretry"; then + _check=check_retry + fi if ! want_check; then _check=true fi @@ -1787,6 +1790,19 @@ check_fakeroot() { do_fakeroot "$abuild_path" $forceroot $color_opt $keep_build check } +# wrap check() with retries +check_retry() { + count=${ABUILD_RETRY_COUNT:=5} + (cd "$startdir"; + try=1 + while [ $try -le $count ]; do + msg "Test attempt $try of $count..." + check && exit 0 + try=$(($try+1)) + [ $try -gt $count ] && exit 1 + done) +} + # build and package in fakeroot rootpkg() { cd "$startdir" |