chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test suite: default dsc distro config setting: Move to lib.
[dgit.git]
/
tests
/
tests
/
mirror
diff --git
a/tests/tests/mirror
b/tests/tests/mirror
index 6f6300e298456e026a8fc5f16c75b4e3bb77a5db..49476880aa2d446b282f330af9855ee896469b81 100755
(executable)
--- a/
tests/tests/mirror
+++ b/
tests/tests/mirror
@@
-3,6
+3,8
@@
set -e
. tests/lib
. $troot/lib-mirror
. tests/lib
. $troot/lib-mirror
+t-dependencies rsync
+
t-drs
: ---- "basic test" ----
t-drs
: ---- "basic test" ----
@@
-30,8
+32,6
@@
set -ex
cat >&2 $sentinel
shift # eat HOST
sh -c "\$*"
cat >&2 $sentinel
shift # eat HOST
sh -c "\$*"
-: ${sentinel}2
-date >${sentinel}2
END
chmod +x $tmp/stunt-ssh
END
chmod +x $tmp/stunt-ssh
@@
-53,8
+53,8
@@
t-check-mirrored
: ----- "stall timeout test" -----
: ----- "stall timeout test" -----
-rm -f $sentinel
${sentinel}2
-mkfifo $sentinel
${sentinel}2
+rm -f $sentinel
+mkfifo $sentinel
t-mirror-set hooktimeout=5
t-mirror-set hooktimeout=5
@@
-65,8
+65,16
@@
t-check-not-mirrored
exec 3<>$sentinel
exec 3>&-
exec 3<>$sentinel
exec 3>&-
-cat ${sentinel}2
+
+attempts=100
+while [ -f $queuedir/$p.lock ]; do
+ if [ $attempts = 0 ]; then \
+ fail "timed out waiting for lock to go away"
+ fi
+ attempts=$(( $attempts - 1 ))
+ sleep 0.1
+done
t-check-mirrored
t-check-mirrored
-echo done.
+t-ok