3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run test-plugin-fd. Note, this plugin is for testing
9 # new features and probably should not be run in normal
12 TestName="test-plugin-test"
13 JobName=TestPluginTest
17 scripts/copy-plugin-confs
20 echo "${cwd}/build/src" >${cwd}/tmp/file-list
22 # Build and install the test plugin
23 cd ${cwd}/build/src/plugins/fd
25 make install-test-plugin
30 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
33 @$out ${cwd}/tmp/log1.out
34 label storage=File1 volume=TestVolume001
35 setdebug level=100 client=$CLIENT
36 estimate job=$JobName level=Full
37 @#setdebug level=150 client=$CLIENT
38 @#setdebug level=150 storage=File1
39 run job=$JobName storage=File1 yes
49 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
54 @$out ${cwd}/tmp/log2.out
55 setdebug level=50 client=$CLIENT
56 restore where=${cwd}/tmp select all storage=File1 done
59 setdebug level=0 client=$CLIENT
70 # ****FIXME**** test if the restore of the two files is OK
73 # Remove plugin so we can try the restore without the plugin
75 mv -f ${cwd}/bin/plugins/test-plugin-fd.so ${cwd}/bin/plugins/test-plugin-fd.sox
77 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
78 @$out ${cwd}/tmp/log2.out
80 @exec "sh -c 'rm -f ${cwd}/bin/plugins/test-plugin-fd.so'"
82 @# now do a restore without the plugin
84 @$out ${cwd}/tmp/log2.out
85 @#setdebug level=50 client=$CLIENT
86 restore where=${cwd}/tmp select all storage=File1 done
96 check_for_zombie_jobs storage=File1
101 mv -f ${cwd}/bin/plugins/test-plugin-fd.sox ${cwd}/bin/plugins/test-plugin-fd.so
105 # ****FIXME**** test that all three files are restored correctly
107 diff ${cwd}/${file} ${cwd}/tmp/${file}