From: Charles-Henri Bruyand Date: Wed, 9 May 2018 00:16:01 +0000 (+0200) Subject: rec-tests: print the logs of supervised processes reported as running for less than... X-Git-Tag: dnsdist-1.3.1~26^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc3c2d2e5167f9eb55b99be26f8119f37b91a568;p=thirdparty%2Fpdns.git rec-tests: print the logs of supervised processes reported as running for less than 3 secs --- diff --git a/build-scripts/test-recursor b/build-scripts/test-recursor index b80c7cc7b8..0fcfc9db7c 100755 --- a/build-scripts/test-recursor +++ b/build-scripts/test-recursor @@ -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