6 # * Get a working Windows OS on your network
7 # * Set the proper environment variables for WIN32_xx at the end
8 # of your regress/config file
9 # * Install strawberry perl version with msi
10 # http://www.bacula.org/downloads/depkgs-mingw32/strawberry-perl-5.10.1.0.msi
11 # * Install the latest version of Bacula FD
12 # * Copy or make accessible (Network share, VirtualBox share)
13 # regress/scripts/regress-win32.pl
14 # * Execute the script on the Windows box
15 # perl regress-win32.pl
16 # Note, this is a server so the script just waits for Bacula
17 # to run and connect to it.
18 # * Create c:\regress\test on the Windows machine
19 # * Allow ports through the Win firewall for perl 8091 and bacula-fd 9102
20 # * Run win32-fd-test regression
22 TestName="win32-fd-test"
27 scripts/copy-test-confs
28 cp scripts/win32-bacula-dir.conf bin/bacula-dir.conf
30 change_jobname NightlySave $JobName
33 URL=http://$WIN32_ADDR:8091
34 echo "Doing wgets ..."
35 wget -qO $tmp/stop.log "$URL/stop"
36 wget -qO $tmp/update.log "$URL/set_director_name?name=$HOST-dir;pass=$WIN32_PASSWORD"
37 wget -qO $tmp/start.log "$URL/start"
39 wget -qO $tmp/init1.log "$URL/init_attrib_test?source=$WIN32_FILE"
40 wget -qO $tmp/init2.log "$URL/init_weird_runscript_test?source=$WIN32_FILE"
41 wget -qO $tmp/clean.log "$URL/cleandir?source=$WIN32_FILE/restore"
45 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
48 @$out ${cwd}/tmp/log1.out
49 status client=$WIN32_CLIENT
50 label storage=File volume=TestVolume001
51 run job=$JobName storage=File yes
57 @$out ${cwd}/tmp/log2.out
58 restore where=$WIN32_FILE/restore select all done storage=File
62 @$out ${cwd}/tmp/log3.out
64 @# make some runscript tests
66 run job=RunScript storage=File yes
69 @$out ${cwd}/tmp/log4.out
71 @# make some accurate tests
73 run job=AccurateJob storage=File yes
81 check_for_zombie_jobs storage=File
86 DST=`echo $WIN32_FILE | sed 's!:!!'`
88 # Compare original and restored directories
89 wget -qO $tmp/1.log "$URL/compare?source=$WIN32_FILE/attrib_test;dest=$WIN32_FILE/restore/$DST/attrib_test"
90 print_debug `cat $tmp/1.log`
92 grep OK $tmp/1.log > /dev/null
97 # Compare with some weird files
98 wget -qO $tmp/2.log "$URL/compare?source=$WIN32_FILE/weird_runscript;dest=$WIN32_FILE/restore/$DST/weird_runscript"
99 print_debug `cat $tmp/2.log`
101 grep OK $tmp/2.log > /dev/null