[master] 4bdfa56 vtest: optionally limit the number of runs
Nils Goroll
nils.goroll at uplex.de
Wed Dec 7 12:05:05 CET 2016
commit 4bdfa56ce1e134de7639cec84f8acb1f4a33f40a
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Dec 7 11:53:59 2016 +0100
vtest: optionally limit the number of runs
This allows unattended updates of vtest.sh itself by looping externally
diff --git a/tools/vtest.sh b/tools/vtest.sh
index 5eff55c..befc44f 100755
--- a/tools/vtest.sh
+++ b/tools/vtest.sh
@@ -44,6 +44,7 @@ WAITPERIOD=60 # unit: Seconds
WAITGOOD=60 # unit: WAITPERIOD
WAITBAD=1 # unit: WAITPERIOD
+MAXRUNS="${MAXRUNS:-0}"
SSH_DST="-p 203 vtest at varnish-cache.org"
@@ -125,9 +126,12 @@ fi
orev=000
waitnext=${WAITBAD}
+i=0
-while true
+while [ $MAXRUNS -eq 0 ] || [ $i -lt $MAXRUNS ]
do
+ i=`expr $i + 1`
+
(cd varnish-cache && git pull > /dev/null 2>&1 || true)
rev=`cd varnish-cache && git show -s --pretty=format:%H`
if [ "${waitnext}" -gt 0 -a "x${rev}" = "x${orev}" ] ; then
More information about the varnish-commit
mailing list