aboutsummaryrefslogtreecommitdiffstats
path: root/testing/git-lfs/wait-longer.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-11-25 17:05:24 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-11-25 18:08:16 +0100
commit81e346a7830dc18e90116840a6a788661a3c8209 (patch)
tree149901f5b65af59c063a1ccebbef78feab1b06c8 /testing/git-lfs/wait-longer.patch
parente3fcf97b39c7f0e32116a66151622af8d6dc1897 (diff)
downloadaports-81e346a7830dc18e90116840a6a788661a3c8209.tar.bz2
aports-81e346a7830dc18e90116840a6a788661a3c8209.tar.xz
testing/git-lfs: fix tests and enable on armhf and aarch64
Diffstat (limited to 'testing/git-lfs/wait-longer.patch')
-rw-r--r--testing/git-lfs/wait-longer.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/git-lfs/wait-longer.patch b/testing/git-lfs/wait-longer.patch
new file mode 100644
index 0000000000..d593e0063a
--- /dev/null
+++ b/testing/git-lfs/wait-longer.patch
@@ -0,0 +1,44 @@
+commit f90446aec14f82d223c22f13efec17752b6ed7bb
+Author: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Date: Fri Nov 3 23:27:57 2017 -0400
+
+ Wait longer for test lfs server to start.
+
+ Also, back off on polling a bit after the first check to reduce any I/O
+ contention that might slow things down even more. Instead of 5 seconds,
+ this will wait up to about 60 seconds for files created by the test
+ server to appear. This allows very slow systems to be able to pass
+ tests.
+
+ Finally, add a message if the file doesn't appear to make it clear what
+ went wrong.
+
+Patch-Source: https://src.fedoraproject.org/rpms/git-lfs/blob/f27/f/wait-longer.patch
+
+diff --git a/test/testhelpers.sh b/test/testhelpers.sh
+index 531d934b..cb31d2ef 100644
+--- a/test/testhelpers.sh
++++ b/test/testhelpers.sh
+@@ -258,15 +258,20 @@ size %s
+ wait_for_file() {
+ local filename="$1"
+ n=0
+- while [ $n -lt 10 ]; do
++ wait_time=1
++ while [ $n -lt 17 ]; do
+ if [ -s $filename ]; then
+ return 0
+ fi
+
+- sleep 0.5
++ sleep $wait_time
+ n=`expr $n + 1`
++ if [ $wait_time -lt 4 ]; then
++ wait_time=`expr $wait_time \* 2`
++ fi
+ done
+
++ echo "$filename did not appear after 60 seconds."
+ return 1
+ }
+