]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
test/travis_before_linux.sh: make for loop more resilient
authorLuca Toscano <elukey@apache.org>
Sat, 28 Dec 2019 08:29:30 +0000 (08:29 +0000)
committerLuca Toscano <elukey@apache.org>
Sat, 28 Dec 2019 08:29:30 +0000 (08:29 +0000)
This is a follow up to my last commit to this file, to make
the for loop more resilient with the following:
- use --force in svn export, otherwise the second attempt will
  always fail due to the dest directory already present.
- exit 1 in case the 5 tries end up in a non zero exit code
  (to fail fast the build).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1872045 13f79535-47bb-0310-9956-ffa450edef68

test/travis_before_linux.sh

index 04f63d9202af4e068a0e164c66d87e042523134a..8e4543b46dcf999ee28e708dcae2d2c95e98930b 100755 (executable)
@@ -5,8 +5,16 @@ if ! test -v SKIP_TESTING; then
    # reporting any progress.
    for i in {1..5} 
    do
-       timeout 60 svn export -q https://svn.apache.org/repos/asf/httpd/test/framework/trunk test/perl-framework
-       if [ $? -eq 0 ]; then break; else sleep 120; fi
+       timeout 60 svn export --force -q https://svn.apache.org/repos/asf/httpd/test/framework/trunk test/perl-framework
+       if [ $? -eq 0 ]; then
+           break
+       else
+           if [ $i -eq 5 ]; then
+               exit 1
+           else
+               sleep 120
+           fi
+       fi
    done
 fi