]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/lzo-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / lzo-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Run a simple backup of the Bacula build directory using the compressed option
9 #   then restore it.
10 #
11 TestName="lzo-test"
12 JobName=lzo
13 . scripts/functions
14
15 grep "LZO support:.*yes" ${cwd}/build/config.out >/dev/null
16 if [ $? != 0 ] ; then
17    echo "LZO support not enabled in Bacula. Skipping lzo-test"
18    exit 0
19 fi
20
21 scripts/cleanup
22 scripts/copy-test-confs
23 echo "${cwd}/build" >${cwd}/tmp/file-list
24
25 start_test
26       
27 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
28 @output /dev/null
29 messages
30 @$out ${cwd}/tmp/log1.out
31 status all
32 status all
33 messages
34 label storage=File volume=TestVolume001
35 run job=LZOTest storage=File yes
36 wait
37 messages
38 @# 
39 @# now do a restore
40 @#
41 @$out ${cwd}/tmp/log2.out
42 restore where=${cwd}/tmp/bacula-restores select storage=File
43 unmark *
44 mark *
45 done
46 yes
47 wait
48 messages
49 quit
50 END_OF_DATA
51
52 run_bacula
53 check_for_zombie_jobs storage=File
54 stop_bacula
55
56 check_two_logs
57 check_restore_diff
58 grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null
59 if [ $? != 0 ] ; then
60    echo "  !!!!! No compression !!!!!"
61    bstat=1
62 fi
63 end_test