. tests/lib
. $troot/lib-mirror
+t-dependencies rsync
+
t-drs
: ---- "basic test" ----
cat >&2 $sentinel
shift # eat HOST
sh -c "\$*"
-: ${sentinel}2
-date >${sentinel}2
END
chmod +x $tmp/stunt-ssh
: ----- "stall timeout test" -----
-rm -f $sentinel ${sentinel}2
-mkfifo $sentinel ${sentinel}2
+rm -f $sentinel
+mkfifo $sentinel
t-mirror-set hooktimeout=5
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
-echo done.
+t-ok