diff options
-rw-r--r-- | testing/git-lfs/APKBUILD | 8 | ||||
-rw-r--r-- | testing/git-lfs/wait-longer.patch | 44 |
2 files changed, 49 insertions, 3 deletions
diff --git a/testing/git-lfs/APKBUILD b/testing/git-lfs/APKBUILD index 5c6e29b0e5..0339c7f431 100644 --- a/testing/git-lfs/APKBUILD +++ b/testing/git-lfs/APKBUILD @@ -5,7 +5,7 @@ pkgver=2.3.4 pkgrel=0 pkgdesc="Git extension for versioning large files" url="https://git-lfs.github.io/" -arch="all !armhf !aarch64" # armhf, aarch64 fails to run +arch="all" license="MIT" depends="git" checkdepends="bash coreutils git-daemon perl-utils" @@ -13,7 +13,8 @@ makedepends="go ronn" subpackages="$pkgname-doc" install="$pkgname.post-install $pkgname.pre-deinstall" source="$pkgname-$pkgver.tar.gz::https://github.com/git-lfs/$pkgname/archive/v$pkgver.tar.gz - fix-test-locks.patch" + fix-test-locks.patch + wait-longer.patch" builddir="$srcdir/src/github.com/git-lfs/$pkgname" export GOPATH="$srcdir:$builddir" @@ -69,4 +70,5 @@ package() { } sha512sums="97174dc9346979777c3951baa86cfc07c85e2df04f13a50114e016facbb3fd5fde08d38825493d4e7ff149a13c87ae44e9e40350cd4950f27fe309ef62b6724a git-lfs-2.3.4.tar.gz -66927aa462cb7b5061442e5ffaf7c9e4a5d97179482dc00de3f4abfad5959a9c55df3e88c211067bf15b5b0ea3ef29b249ca32290cc9839280266de5c6854b3f fix-test-locks.patch" +66927aa462cb7b5061442e5ffaf7c9e4a5d97179482dc00de3f4abfad5959a9c55df3e88c211067bf15b5b0ea3ef29b249ca32290cc9839280266de5c6854b3f fix-test-locks.patch +408f30bd047dc6bc502c37698615067b6496966e3c0d76e2c36d2eff50d87567aac9b9cbd3bb683566ffdd534a76d7e193ed6338b06c81dc358330de9f7f7903 wait-longer.patch" 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 + } + |