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 # * If you put bacula binaries in release32 and release64, the script will
22 # * Run win32-fd-test regression
24 TestName="win32-fd-test"
29 scripts/copy-test-confs
30 cp scripts/win32-bacula-dir.conf bin/bacula-dir.conf
32 change_jobname NightlySave $JobName
35 URL=http://$WIN32_ADDR:8091
36 echo "Doing wgets ..."
37 wget -qO $tmp/stop.log "$URL/stop"
38 wget -qO $tmp/update.log "$URL/set_director_name?name=$HOST-dir;pass=$WIN32_PASSWORD"
39 wget -qO $tmp/start.log "$URL/start"
41 wget -qO $tmp/init1.log "$URL/init_attrib_test?source=$WIN32_FILE"
42 wget -qO $tmp/init2.log "$URL/init_weird_runscript_test?source=$WIN32_FILE"
43 wget -qO $tmp/clean.log "$URL/cleandir?source=$WIN32_FILE/restore"
45 # try to upgrade win32 binaries
48 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
51 @$out ${cwd}/tmp/log1.out
52 status client=$WIN32_CLIENT
53 label storage=File volume=TestVolume001
54 run job=$JobName storage=File yes
60 @$out ${cwd}/tmp/log2.out
61 restore where=$WIN32_FILE/restore select all done storage=File
65 @$out ${cwd}/tmp/log3.out
67 @# make some runscript tests
69 run job=RunScript storage=File yes
72 @$out ${cwd}/tmp/log4.out
74 @# make some accurate tests
76 run job=AccurateJob storage=File yes
84 check_for_zombie_jobs storage=File
89 DST=`echo $WIN32_FILE | sed 's!:!!'`
91 # Compare original and restored directories
92 wget -qO $tmp/1.log "$URL/compare?source=$WIN32_FILE/attrib_test;dest=$WIN32_FILE/restore/$DST/attrib_test"
93 print_debug `cat $tmp/1.log`
95 grep OK $tmp/1.log > /dev/null
100 # Compare with some weird files
101 wget -qO $tmp/2.log "$URL/compare?source=$WIN32_FILE/weird_runscript;dest=$WIN32_FILE/restore/$DST/weird_runscript"
102 print_debug `cat $tmp/2.log`
104 grep OK $tmp/2.log > /dev/null