From d1b8404967060594684bb2448fde7f698b27396c Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 13 Nov 2006 21:47:24 +0000 Subject: [PATCH] ebl fix git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3619 91ce42f0-d328-0410-95d8-f526ca767f89 --- .../scripts/bacula-dir.conf.testrunscript.in | 14 ++++---- regress/tests/runscript-test | 33 +++++++++---------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/regress/scripts/bacula-dir.conf.testrunscript.in b/regress/scripts/bacula-dir.conf.testrunscript.in index 5f1b13cda0..c93a4ce7a7 100644 --- a/regress/scripts/bacula-dir.conf.testrunscript.in +++ b/regress/scripts/bacula-dir.conf.testrunscript.in @@ -74,24 +74,24 @@ Job { Name = "RUN_DIR_FAILED" FileSet = FS_TESTJOB JobDefs = DefaultJob - RunBeforeJob = "/bin/false" + RunBeforeJob = "/bin/false RUN_DIR_FAILED" Run After Failed Job = "/bin/echo RunAfterFailedJob" } -#@hostname@-fd: ClientBeforeJob: run command "/bin/false" -#@hostname@-fd: ClientBeforeJob: run command "/bin/false 2" +#@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1" +#@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2" #@hostname@-dir: AfterJob: run command "/bin/echo RunAfterFailedJob" Job { Name = "RUN_FD_FAILED" FileSet = FS_TESTJOB JobDefs = DefaultJob RunScript { - Command = "/bin/false" + Command = "/bin/false RUN_FD_FAILED1" abortjobonerror = no RunsWhen = Before } RunScript { - Command = "/bin/false 2" + Command = "/bin/false RUN_FD_FAILED2" abortjobonerror = yes RunsWhen = Before } @@ -99,14 +99,14 @@ Job { Run After Failed Job = "/bin/echo RunAfterFailedJob" } -#@hostname@-fd: ClientBeforeJob: run command "/bin/false" +#@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_WARNING" #Backup OK -- with warnings Job { Name = "RUN_FD_WARNING" FileSet = FS_TESTJOB JobDefs = DefaultJob RunScript { - Command = "/bin/false After False" + Command = "/bin/false RUN_FD_WARNING" abortjobonerror = no RunsWhen = Before } diff --git a/regress/tests/runscript-test b/regress/tests/runscript-test index 379e438c4e..6deb7e266a 100755 --- a/regress/tests/runscript-test +++ b/regress/tests/runscript-test @@ -21,23 +21,20 @@ cat <tmp/bconcmds messages label volume=TestVolume001 @#setdebug level=100 storage=File -@output tmp/log.RUN_ALL_OK.out +@output tmp/log.RUN1.out run job=RUN_ALL_OK yes wait @sleep 5 messages -@output tmp/log.RUN_DIR_FAILED.out -run job=RUN_DIR_FAILED yes +run job=RUN_FD_WARNING yes wait @sleep 5 messages -@output tmp/log.RUN_FD_FAILED.out run job=RUN_FD_FAILED yes wait @sleep 5 messages -@output tmp/log.RUN_FD_WARNING.out -run job=RUN_FD_WARNING yes +run job=RUN_DIR_FAILED yes wait @sleep 5 messages @@ -48,10 +45,10 @@ END_OF_DATA run_bacula stop_bacula -if grep -q 'dir: BeforeJob: run command "/bin/echo RunBeforeJob"' tmp/log.RUN_ALL_OK.out && - grep -q 'fd: ClientRunBeforeJob: ClientRunBeforeJob' tmp/log.RUN_ALL_OK.out && - grep -q 'fd: ClientAfterJob: run command "/bin/echo ClientRunAfterJob' tmp/log.RUN_ALL_OK.out && - grep -q 'dir: AfterJob: run command "/bin/echo RunAfterJob' tmp/log.RUN_ALL_OK.out +if grep -q 'dir: BeforeJob: run command "/bin/echo RunBeforeJob"' tmp/log.RUN1.out && + grep -q 'fd: ClientRunBeforeJob: ClientRunBeforeJob' tmp/log.RUN1.out && + grep -q 'fd: ClientAfterJob: run command "/bin/echo ClientRunAfterJob' tmp/log.RUN1.out && + grep -q 'dir: AfterJob: run command "/bin/echo RunAfterJob' tmp/log.RUN1.out then [ "$debug" -eq 1 ] && echo RUN_ALL_OK ok else @@ -59,9 +56,9 @@ else rstat=1 fi -if grep -q 'dir: BeforeJob: run command "/bin/false"' tmp/log.RUN_DIR_FAILED.out && - grep -q 'dir: BeforeJob: RunAfterFailedJob' tmp/log.RUN_DIR_FAILED.out && - true # grep -q 'Backup OK -- with warnings' tmp/log.RUN_DIR_FAILED.out +if grep -q 'dir: BeforeJob: run command "/bin/false RUN_DIR_FAILED"' tmp/log.RUN1.out && + grep -q 'dir: BeforeJob: RunAfterFailedJob' tmp/log.RUN1.out && + true # grep -q 'Backup OK -- with warnings' tmp/log.RUN1.out then [ "$debug" -eq 1 ] && echo RUN_DIR_FAILED ok else @@ -69,9 +66,9 @@ else rstat=1 fi -if grep -q 'fd: ClientBeforeJob: run command "/bin/false"' tmp/log.RUN_FD_FAILED.out && - grep -q 'fd: ClientBeforeJob: run command "/bin/false 2"' tmp/log.RUN_FD_FAILED.out && - grep -q 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' tmp/log.RUN_FD_FAILED.out +if grep -q 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' tmp/log.RUN1.out && + grep -q 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' tmp/log.RUN1.out && + grep -q 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' tmp/log.RUN1.out then [ "$debug" -eq 1 ] && echo RUN_FD_FAILED ok else @@ -79,8 +76,8 @@ else rstat=1 fi -if grep -q 'fd: ClientBeforeJob: run command "/bin/false"' tmp/log.RUN_FD_WARNING.out && - grep -q 'Backup OK -- with warnings' tmp/log.RUN_FD_WARNING.out +if grep -q 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_WARNING"' tmp/log.RUN1.out && + grep -q 'Backup OK -- with warnings' tmp/log.RUN1.out then [ "$debug" -eq 1 ] && echo RUN_FD_WARNING ok else -- 2.39.5