X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Ffileregexp-test;h=e4dbe2678612f0423ad6341e65b96be2ac303666;hb=8ee711f2e7b445b00de916f5712c59749afc2407;hp=a30d1285772aaa4cedaf1ef5bfa32be4f9ea253e;hpb=3891f2a9b42dbf2a9e6ba6d86ff7c3929753c74b;p=bacula%2Fbacula diff --git a/regress/tests/fileregexp-test b/regress/tests/fileregexp-test index a30d128577..e4dbe26786 100755 --- a/regress/tests/fileregexp-test +++ b/regress/tests/fileregexp-test @@ -20,14 +20,14 @@ echo "s%File Retention =%File Retention = 2 #%" >> ${outf} cp ${scripts}/bacula-dir.conf ${tmp}/1 sed -f ${outf} ${tmp}/1 >${scripts}/bacula-dir.conf -change_jobname Client1 $JobName +change_jobname BackupClient1 $JobName start_test cat <${tmp}/bconcmds -@output /dev/null +@$out /dev/null messages @$out ${tmp}/log1.out -label volume=TestVolume001 storage=File pool=Default +label volume=TestVolume001 storage=File pool=File run job=$JobName yes wait messages @@ -44,7 +44,6 @@ README yes wait messages -@$out quit END_OF_DATA @@ -52,11 +51,18 @@ run_bacula check_for_zombie_jobs storage=File stop_bacula +# +# The above restore should have restored some directories, but only +# files that have README in their name. There should in fact, be +# no other files restored COUNT_OTHER==0 and 13 README files restored. +# We complain if there are less than 11 +# COUNT_OTHER=`find ${tmp}/bacula-restores -type f | grep -v README | wc -l` COUNT_README=`find ${tmp}/bacula-restores -type f | grep README | wc -l` -if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 15 ]; then +if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 11 ]; then print_debug "Found non matching files" + print debug "Count_other=$COUNT_OTHER count_readme=$COUNT_README" print_debug `find ${tmp}/bacula-restores -type f | grep -v README` rstat=2 fi