]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl tweak tests to show #897
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 22 Jul 2007 18:04:07 +0000 (18:04 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 22 Jul 2007 18:04:07 +0000 (18:04 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5225 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/bacula-dir.conf.testrunscript.in
regress/tests/runscript-test

index fbac7d74d3437585fbbab871ee14ec4ceefde3bd..651f4f572dbdf826b304068da11fa20ef55dd098 100644 (file)
@@ -97,6 +97,16 @@ Job {
   }
 
   Run After Failed Job = "/bin/echo RunAfterFailedJob"
+  RunScript {
+    Command = "/bin/echo touching /tmp/RUN_FD_FAILED"
+    RunsWhen = after
+    RunsOnFailure = yes
+  }
+  RunScript {
+    Command = "/bin/touch /tmp/RUN_FD_FAILED"
+    RunsWhen = after
+    RunsOnFailure = yes
+  }
 }
 
 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"
index 8b6ed0c012ad879c505312acd6b5c10efa239556..5085e25583ad3934806299eca8191e0aba50156c 100755 (executable)
@@ -94,9 +94,11 @@ grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' tmp/RUN_FD_F
 b=$?
 grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
 c=$?
-grep '*** Backup Error ***' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+grep 'touching' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
 d=$?
-if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 ]
+grep '*** Backup Error ***' tmp/RUN_FD_FAILED.log >/dev/null 2>&1
+e=$?
+if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 ]
 then
    [ "$debug" = 1 ] && echo RUN_FD_FAILED ok
 else