]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/maxtime-test
ebl Add new tests
[bacula/bacula] / regress / tests / maxtime-test
index 685a40f8669284debb88cfd91e125faf4f18d5b8..ea69fb26fd6d9e8474c4d11ccc9fdba43e20f163 100755 (executable)
@@ -7,7 +7,7 @@ TestName="maxtime-test"
 JobName=backup
 
 . scripts/functions
-set_debug 0
+
 copy_test_confs
 
 rm -f bin/bacula-dir.conf
@@ -52,7 +52,7 @@ export dstat=0
 export bstat=0
 export rstat=0
 
-if grep -q -e 'RUN_MAXWAITTIME.* Fatal error: Max wait time exceeded. Job canceled.' tmp/RUN_MAXTIME.log
+if grep -e 'RUN_MAXWAITTIME.* Fatal error: Max wait time exceeded. Job canceled.' tmp/RUN_MAXTIME.log >/dev/null 2>&1
 then
     [ "$debug" = 1 ] && echo MAXWAITTIME ok
 else
@@ -60,7 +60,8 @@ else
    rstat=1
 fi
 
-if grep -q -e 'RUN_MAXSTARTDELAY.* Fatal error: Job canceled because max start delay time exceeded.' tmp/RUN_MAXTIME.log
+if grep -e 'RUN_MAXSTARTDELAY.* Fatal error: Job canceled because max start delay time exceeded.' tmp/RUN_MAXTIME.log &&
+  ! grep -e 'NEVER start this' tmp/RUN_MAXTIME.log >/dev/null 2>&1
 then
     [ "$debug" = 1 ] && echo MAXSTARTDELAY ok
 else
@@ -68,7 +69,7 @@ else
    rstat=1
 fi
 
-if grep -q -e 'RUN_MAXRUNTIME.* Fatal error: Max run time exceeded. Job canceled.' tmp/RUN_MAXTIME.log
+if grep -e 'RUN_MAXRUNTIME.* Fatal error: Max run time exceeded. Job canceled.' tmp/RUN_MAXTIME.log >/dev/null 2>&1
 then
     [ "$debug" = 1 ] && echo MAXRUNTIME ok
 else
@@ -76,4 +77,4 @@ else
    rstat=1
 fi
 
-end_test
\ No newline at end of file
+end_test