From: Eric Bollengier Date: Mon, 7 Dec 2009 13:39:08 +0000 (+0100) Subject: Add new test for win32 X-Git-Tag: Release-5.0.0~179^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b55b96be09da52aa6f03ad30e112de9aba76730f;p=bacula%2Fbacula Add new test for win32 --- diff --git a/regress/tests/win32-fd-test b/regress/tests/win32-fd-test new file mode 100644 index 0000000000..099f2b3624 --- /dev/null +++ b/regress/tests/win32-fd-test @@ -0,0 +1,98 @@ +#!/bin/sh +# +# How to use this test +# -------------------- +# +# * Get a working Windows OS on your network +# * Install strawberry perl version with msi +# http://www.bacula.org/downloads/depkgs-mingw32/strawberry-perl-5.10.1.0.msi +# * Install the latest version of Bacula FD +# * Copy or make accessible (Network share, VirtualBox share) +# regress/scripts/regress-win32.pl +# * Execute the script on the Windows box +# perl regress-win32.pl +# * Run this script with the proper config settings about WIN32 +# +TestName="win32-fd-test" +JobName=win32 +. scripts/functions + +scripts/cleanup +scripts/copy-test-confs +cp scripts/win32-bacula-dir.conf bin/bacula-dir.conf + +URL=http://$WIN32_ADDR:8091 +wget -qO $tmp/stop.log "$URL/stop" +wget -qO $tmp/update.log "$URL/set_director_name?name=$HOST-dir;pass=$WIN32_PASSWORD" +wget -qO $tmp/start.log "$URL/start" + +wget -qO $tmp/init1.log "$URL/init_attrib_test?source=$WIN32_FILE" +wget -qO $tmp/init2.log "$URL/init_weird_runscript_test?source=$WIN32_FILE" +wget -qO $tmp/clean.log "$URL/cleandir?source=$WIN32_FILE/restore" + +change_jobname NightlySave $JobName +start_test + +cat <${cwd}/tmp/bconcmds +@output +messages +@$out ${cwd}/tmp/log1.out +status client=$WIN32_CLIENT +label storage=File volume=TestVolume001 +run job=$JobName storage=File yes +wait +messages +@# +@# now do a restore +@# +@$out ${cwd}/tmp/log2.out +restore where=$WIN32_FILE/restore select all done storage=File +yes +wait +messages +@$out ${cwd}/tmp/log3.out +@# +@# make some runscript tests +@# +run job=RunScript storage=File yes +wait +messages +@$out ${cwd}/tmp/log4.out +@# +@# make some accurate tests +@# +run job=AccurateJob storage=File yes +wait +messages +@output +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs + +DST=`echo $WIN32_FILE | sed 's!:!!'` + +# Compare original and restored directories +wget -qO $tmp/1.log "$URL/compare?source=$WIN32_FILE/attrib_test;dest=$WIN32_FILE/restore/$DST/attrib_test" +print_debug `cat $tmp/1.log` +rstat=0 +grep OK $tmp/1.log > /dev/null +if [ $? != 0 ]; then + rstat=1 +fi + +# Compare with some weird files +wget -qO $tmp/2.log "$URL/compare?source=$WIN32_FILE/weird_runcript;dest=$WIN32_FILE/restore/$DST/weird_runcript" +print_debug `cat $tmp/2.log` + +grep OK $tmp/2.log > /dev/null +if [ $? != 0 ]; then + rstat=2 +fi + +dstat=0 +end_test