]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Introduce wait_for_log in autosign test
authorMatthijs Mekking <matthijs@isc.org>
Mon, 9 Dec 2019 14:52:00 +0000 (15:52 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Mon, 9 Dec 2019 14:52:00 +0000 (15:52 +0100)
bin/tests/system/autosign/tests.sh

index 73c3e1fdc65685d924d2d65d494fc74c58a4ee53..bef0462d2f5d7b82a935900843f97f5d4ad25cfe 100755 (executable)
@@ -18,6 +18,17 @@ n=0
 DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
 RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
+wait_for_log () {
+       msg=$1
+       file=$2
+       for i in 1 2 3 4 5 6 7 8 9 10; do
+               nextpart "$file" | grep "$msg" > /dev/null && return
+               sleep 1
+       done
+       echo_i "exceeded time limit waiting for '$msg' in $file"
+       ret=1
+}
+
 # convert private-type records to readable form
 showprivate () {
     echo "-- $@ --"