@$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
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 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