]> granicus.if.org Git - pdns/commitdiff
rec-tests: print the logs of supervised processes reported as running for less than...
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Wed, 9 May 2018 00:16:01 +0000 (02:16 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 17 May 2018 16:32:09 +0000 (18:32 +0200)
build-scripts/test-recursor

index b80c7cc7b86c6c8cb37a229c4da5185c09c74e26..0fcfc9db7cceb80a792887f66f8bdb9a783d5863 100755 (executable)
@@ -44,6 +44,16 @@ EXIT=0
 ./start.sh
 sleep 3
 svstat configs/*
+## prints the logs of supervised processes reported as running for less than 3 secs
+for config in configs/* ; do
+    secs=$(svstat ${config} | awk 'match($0, /([0-9]+) seconds/, r) { print r[1] }')
+    if [ -n "${secs}" ] && [ ${secs} -lt 3 ] ; then
+        echo "-----------------"
+        echo "Logs of ${config}"
+        echo "-----------------"
+        cat ${config}/logfile
+    fi
+done
 ./runtests || EXIT=1
 ./stop.sh
 sleep 3