]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/compressed-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / compressed-test
index bc37c03f7abda184abd1305213401544bc54f061..3f9eeb6dd8f5d66641ec9c140dcd3c0d26f5b385 100755 (executable)
@@ -1,55 +1,58 @@
 #!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
 #
 # Run a simple backup of the Bacula build directory using the compressed option
 #   then restore it.
 #
-cwd=`pwd`
-scripts/copy-test-confs
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop  2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
+TestName="compressed-test"
+JobName=compressed
+. scripts/functions
 
-echo " "
-echo " "
-echo " === Starting compressed-test ==="
-echo " === Starting compressed-test ===" >>tmp/log
-echo " "
+scripts/cleanup
+scripts/copy-test-confs
+echo "${cwd}/build" >${cwd}/tmp/file-list
 
-bin/bacula start
-bin/console -c bin/console.conf <<END_OF_DATA
+change_jobname CompressedTest $JobName
+start_test
+      
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @output /dev/null
 messages
-@output
-label storage=File
-TestVolume001
-run job=CompressedTest
-yes
+@$out ${cwd}/tmp/log1.out
+status all
+status all
+messages
+label storage=File volume=TestVolume001
+run job=$JobName storage=File yes
 wait
 messages
 @# 
 @# now do a restore
 @#
-restore
-5
+@$out ${cwd}/tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select storage=File
+unmark *
+mark *
 done
 yes
 wait
-@output /dev/null
 messages
 quit
 END_OF_DATA
-bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null
 if [ $? != 0 ] ; then
-   echo " "
-   echo " "
-   echo "  ===== compressed-test Bacula source failed!!! ===== "
-   echo "  ===== compressed-test failed!!! ===== " >>test.out
-   echo " "
-else
-   echo "  ===== compressed-test Bacula source OK ===== "
-   echo "  ===== compressed-test OK ===== " >>test.out
-   scripts/cleanup
+   echo "  !!!!! No compression !!!!!"
+   bstat=1
 fi
+end_test