From 1a96af3256198be0c6f138871eb6a6204b4406d9 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 3 Apr 2008 15:44:21 +0000 Subject: [PATCH] ebl Improve maxtime test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6733 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/tests/maxtime-test | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/regress/tests/maxtime-test b/regress/tests/maxtime-test index 0452a867c4..3c4e30429d 100755 --- a/regress/tests/maxtime-test +++ b/regress/tests/maxtime-test @@ -52,29 +52,36 @@ export dstat=0 export bstat=0 export rstat=0 -if grep -e 'RUN_MAXWAITTIME.* Fatal error: Max wait time exceeded. Job canceled.' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null 2>&1 +grep -e '1: Fatal error: Max wait time exceeded. Job canceled.' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null +if [ $? -eq 0 ] then [ "$debug" = 1 ] && echo MAXWAITTIME ok else echo "MAXWAITTIME in error" - rstat=1 + bstat=1 fi -if grep -e 'RUN_MAXSTARTDELAY.* Fatal error: Job canceled because max start delay time exceeded.' ${cwd}/tmp/RUN_MAXTIME.log && - ! grep -e 'NEVER start this' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null 2>&1 +grep -e '2: Fatal error: Job canceled because max start delay time exceeded.' ${cwd}/tmp/RUN_MAXTIME.log > /dev/null +f=$? + +grep -e 'NEVER start this' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null +s=$? + +if [ $f -eq 0 -a $s -ne 0 ] then [ "$debug" = 1 ] && echo MAXSTARTDELAY ok else echo "MAXSTARTDELAY in error" - rstat=1 + bstat=1 fi -if grep -e 'RUN_MAXRUNTIME.* Fatal error: Max run time exceeded. Job canceled.' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null 2>&1 +grep -e '3: Fatal error: Max run time exceeded. Job canceled.' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null +if [ $? -eq 0 ] then [ "$debug" = 1 ] && echo MAXRUNTIME ok else echo "MAXRUNTIME in error" - rstat=1 + bstat=1 fi end_test -- 2.39.5