]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/sparse-compressed-test
Update tests
[bacula/bacula] / regress / tests / sparse-compressed-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the Sparse 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 sparse-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=SparseCompressedTest
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
43 bin/bacula stop
44 diff -ur build /tmp/bacula-restores${cwd}/build
45 if [ $? != 0 ] ; then
46    echo " "
47    echo " "
48    echo "  ===== sparse-compressed-test Bacula source failed!!! ===== "
49    echo "  ===== sparse-compressed-test failed!!! ===== " >>test.out
50    echo " "
51 else
52    echo "  ===== sparse-compressed-test Bacula source OK ===== "
53    echo "  ===== sparse-compressed-test OK ===== " >>test.out
54    rm -rf /tmp/bacula-restores /tmp/TestVolume001
55 fi