From fc3c2d2e5167f9eb55b99be26f8119f37b91a568 Mon Sep 17 00:00:00 2001 From: Charles-Henri Bruyand Date: Wed, 9 May 2018 02:16:01 +0200 Subject: [PATCH] rec-tests: print the logs of supervised processes reported as running for less than 3 secs --- build-scripts/test-recursor | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.47.2