File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,37 @@ if grep ip6-localhost /etc/hosts; then
2121 cat /etc/hosts
2222fi
2323
24+ # Use a rudimental retry workflow as workaround to svn export hanging
25+ # for minutes or failing randomly. Travis automatically kills a build
26+ # if one step takes more than 10 minutes without reporting any
27+ # progress.
28+ function run_svn_export() {
29+ local url=$1
30+ local revision=$2
31+ local dest_dir=$3
32+ local max_tries=$4
33+
34+ # Disable -e to allow fail/retry
35+ set +e
36+
37+ for i in $( seq 1 $max_tries )
38+ do
39+ timeout 60 svn export -r ${revision} --force -q $url $dest_dir
40+ if [ $? -eq 0 ]; then
41+ break
42+ else
43+ if [ $i -eq $max_tries ]; then
44+ exit 1
45+ else
46+ sleep $(( 100 * i))
47+ fi
48+ fi
49+ done
50+
51+ # Restore -e behavior after fail/retry
52+ set -e
53+ }
54+
2455function install_apx() {
2556 local name=$1
2657 local version=$2
@@ -112,7 +143,7 @@ if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then
112143 # use a checkout of trunk until there is an updated CPAN release
113144 # with that revision.
114145 if test -v TEST_OPENSSL3; then
115- svn co -q https://svn.apache.org/repos/asf/perl/Apache-Test/trunk test/perl-framework/Apache-Test
146+ run_svn_export https://svn.apache.org/repos/asf/perl/Apache-Test/trunk HEAD test/perl-framework/Apache-Test 5
116147 fi
117148fi
118149
You can’t perform that action at this time.
0 commit comments