Patch to wait longer for slow arm/aarch.
This commit is contained in:
parent
4b82cafe51
commit
ed55ea90eb
@ -28,12 +28,14 @@
|
||||
|
||||
Name: git-lfs
|
||||
Version: 2.3.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Git extension for versioning large files
|
||||
|
||||
License: MIT
|
||||
URL: https://git-lfs.github.io/
|
||||
Source0: https://%{provider_prefix}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
# https://github.com/git-lfs/git-lfs/pull/2716
|
||||
Patch0001: wait-longer.patch
|
||||
|
||||
ExclusiveArch: %{go_arches}
|
||||
BuildRequires: compiler(go-compiler)
|
||||
@ -210,6 +212,9 @@ popd
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Nov 03 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 2.3.4-2
|
||||
- Patch tests to work on slow systems like arm and aarch builders.
|
||||
|
||||
* Fri Nov 03 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 2.3.4-1
|
||||
- Update to latest release.
|
||||
- Run all tests during build.
|
||||
|
42
wait-longer.patch
Normal file
42
wait-longer.patch
Normal file
@ -0,0 +1,42 @@
|
||||
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.
|
||||
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user