]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/maxtime-test
Make test work as expected
[bacula/bacula] / regress / tests / maxtime-test
index 3c4e30429d39ad8d9cee0379568628dbd1ca71e3..0b1de00cd74a0ba407d14a51409624c2d98ae229 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#  Test RunScript
+#  Test MaxWaitTime, MaxRunTime and MaxStartDelay
 #
 
 TestName="maxtime-test"
@@ -13,7 +13,7 @@ copy_test_confs
 rm -f bin/bacula-dir.conf
 rm -f ${cwd}/tmp/RUN*log
 /bin/cp -f scripts/bacula-dir.conf.maxtime bin/bacula-dir.conf
-WHEN=$(date '+%Y-%m-%d %H:%M:%S')
+WHEN=`date '+%Y-%m-%d %H:%M:%S'`
 
 echo "${cwd}/build/po" >${cwd}/tmp/file-list
 
@@ -42,8 +42,8 @@ END_OF_DATA
  mkfifo ${cwd}/tmp/fifo2
  mkfifo ${cwd}/tmp/fifo3) 2> /dev/null
 
-bin/bacula start
-cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
+run_bacula
+check_for_zombie_jobs storage=File
 stop_bacula
 
 rm ${cwd}/tmp/fifo ${cwd}/tmp/fifo2 ${cwd}/tmp/fifo3
@@ -51,6 +51,7 @@ rm ${cwd}/tmp/fifo ${cwd}/tmp/fifo2 ${cwd}/tmp/fifo3
 export dstat=0
 export bstat=0
 export rstat=0
+touch ${cwd}/tmp/log1.out
 
 grep -e '1: Fatal error: Max wait time exceeded. Job canceled.' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null
 if [ $? -eq 0 ]