3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Run a simple backup of the Bacula build directory
7 # See if we have the list of files backed up in a log
10 TestName="messages-saved-test"
16 change_jobname BackupClient1 $JobName
19 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "ClientRunBeforeJob", "echo this is a test", "Job", "backup")'
20 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "ClientRunAfterJob", "echo this is a test", "Job", "backup")'
21 $bperl -e 'add_attribute("$conf/bacula-fd.conf", "Append", "$tmp/fd.log = All, Saved", "Messages", "Standard")'
23 cat <<END_OF_DATA >$tmp/bconcmds
27 @#setdebug level=100 storage=File
28 label volume=TestVolume001 storage=File1 pool=File drive=0 slot=0
38 check_for_zombie_jobs storage=File
41 nb=`cat $tmp/fd.log | wc -l`
42 if [ $nb -lt 1000 ]; then
43 print_debug "ERROR: Not enough line in $tmp/fd.log"
47 grep po/fr.po $tmp/fd.log > /dev/null
49 print_debug "ERROR: Should find po/fr.po in $tmp/fd.log"
53 grep "ClientRunBeforeJob: this is a test" $tmp/fd.log > /dev/null
55 print_debug "ERROR: Should runscript output in $tmp/fd.log"