From: Eric Bollengier Date: Sun, 22 Jul 2007 18:04:07 +0000 (+0000) Subject: ebl tweak tests to show #897 X-Git-Tag: Release-2.2.0~109 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4cdb40746cc883af8e190365092f25d1ff2d9333;p=bacula%2Fbacula ebl tweak tests to show #897 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5225 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/scripts/bacula-dir.conf.testrunscript.in b/regress/scripts/bacula-dir.conf.testrunscript.in index fbac7d74d3..651f4f572d 100644 --- a/regress/scripts/bacula-dir.conf.testrunscript.in +++ b/regress/scripts/bacula-dir.conf.testrunscript.in @@ -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" diff --git a/regress/tests/runscript-test b/regress/tests/runscript-test index 8b6ed0c012..5085e25583 100755 --- a/regress/tests/runscript-test +++ b/regress/tests/runscript-test @@ -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