]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/compressed-test
Update tests
[bacula/bacula] / regress / tests / compressed-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the compressed option
4 #   then restore it.
5 #
6 cwd=`pwd`
7 scripts/copy-test-confs
8 rm -rf /tmp/TestVolume001 /tmp/bacula-restores
9 echo "${cwd}/build" >/tmp/file-list
10 bin/bacula stop  2>&1 >/dev/null
11 bin/drop_sqlite_tables
12 bin/make_sqlite_tables
13
14 echo " "
15 echo " "
16 echo " === Starting compressed-test ==="
17 echo " "
18
19 bin/bacula start
20 bin/console -c bin/console.conf <<END_OF_DATA
21 @output /dev/null
22 messages
23 @output
24 label storage=File
25 TestVolume001
26 run job=CompressedTest
27 yes
28 wait
29 messages
30 @# 
31 @# now do a restore
32 @#
33 restore
34 5
35 done
36 yes
37 wait
38 @output /dev/null
39 messages
40 quit
41 END_OF_DATA
42 bin/bacula stop
43 diff -ur build /tmp/bacula-restores${cwd}/build
44 if [ $? != 0 ] ; then
45    echo " "
46    echo " "
47    echo "  ===== compressed-test Bacula source failed!!! ===== "
48    echo "  ===== compressed-test failed!!! ===== " >>test.out
49    echo " "
50 else
51    echo "  ===== compressed-test Bacula source OK ===== "
52    echo "  ===== compressed-test OK ===== " >>test.out
53    rm -rf /tmp/bacula-restores /tmp/TestVolume001
54 fi