start_test
cat <<END_OF_SCRIPT >${cwd}/tmp/bconcmds
-@output /dev/null
+@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
status all
list pools
list volumes
wait
+sql
+SELECT StartTime, JobFiles, JobId, Level, count(*) AS nb_jobmedia
+FROM JobMedia join Job using (JobId) join Client using (ClientId)
+where Client.Name = 'localhost-fd' group by JobId, Level, StartTime,
+JobFiles order by JobId desc ;
+
messages
@#
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
+@#setdebug level=400 storage=File
restore where=${cwd}/tmp/bacula-restores select storage=File
unmark *
mark *
yes
wait
messages
-@$out
quit
END_OF_SCRIPT
run_bacula
-check_for_zombie_jobs storage=File || exit 1
+check_for_zombie_jobs storage=File
stop_bacula
check_two_logs