]> git.sur5r.net Git - bacula/bacula/commitdiff
Merge unix regress changes into Windows port.
authorRobert Nelson <robertn@the-nelsons.org>
Sat, 2 Dec 2006 14:18:54 +0000 (14:18 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Sat, 2 Dec 2006 14:18:54 +0000 (14:18 +0000)
Port migration tests.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3733 91ce42f0-d328-0410-95d8-f526ca767f89

26 files changed:
regress/scripts/bacula-sd-2disk-drive.conf [deleted file]
regress/scripts/bacula-sd-2disk.conf [deleted file]
regress/win32/all-non-root-tests.cmd
regress/win32/scripts/new-test-bacula-dir.conf.in
regress/win32/tests/bextract-test.bscr
regress/win32/tests/bextract-test.cmd
regress/win32/tests/bscan-test.cmd
regress/win32/tests/compressed-test.cmd
regress/win32/tests/filed-crypto-test [deleted file]
regress/win32/tests/migration-job-test [deleted file]
regress/win32/tests/migration-job-test.cmd [new file with mode: 0644]
regress/win32/tests/migration-jobspan-test [deleted file]
regress/win32/tests/migration-jobspan-test.cmd [new file with mode: 0644]
regress/win32/tests/migration-occupancy-test [deleted file]
regress/win32/tests/migration-occupancy-test.cmd [new file with mode: 0644]
regress/win32/tests/migration-time-test [deleted file]
regress/win32/tests/migration-time-test.cmd [new file with mode: 0644]
regress/win32/tests/migration-volume-test [deleted file]
regress/win32/tests/migration-volume-test.cmd [new file with mode: 0644]
regress/win32/tests/restore-disk-seek-test.cmd
regress/win32/tests/span-vol-test.cmd
regress/win32/tests/sparse-compressed-test.cmd
regress/win32/tests/two-pool-test.cmd
regress/win32/tests/two-vol-test.cmd
regress/win32/tests/two-volume-tape.cmd
regress/win32/tests/two-volume-test.cmd

diff --git a/regress/scripts/bacula-sd-2disk-drive.conf b/regress/scripts/bacula-sd-2disk-drive.conf
deleted file mode 100644 (file)
index 1d56020..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Default Bacula Storage Daemon Configuration file
-#
-#  For Bacula release 1.39
-#
-# You may need to change the name of your tape drive
-#   on the "Archive Device" directive in the Device
-#   resource.  If you change the Name and/or the 
-#   "Media Type" in the Device resource, please ensure
-#   that dird.conf has corresponding changes.
-#
-
-Storage {                             # definition of myself
-  Name = localhost-sd
-  SDPort = 8103                  # Director's port      
-  WorkingDirectory = "/home/kern/bacula/regress/working"
-  Pid Directory = "/home/kern/bacula/regress/working"
-  Subsys Directory = "/home/kern/bacula/regress/working"
-}
-
-#
-# List Directors who are permitted to contact Storage daemon
-#
-Director {
-  Name = localhost-dir
-  Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
-}
-
-#
-# Devices supported by this Storage daemon
-# To connect, the Director's bacula-dir.conf must have the
-#  same Name and MediaType. 
-#
-Autochanger {
-  Name = DDS-4
-  Changer Device = /home/kern/bacula/regress/tmp/disk-changer/conf
-  Changer Command ="/home/kern/bacula/regress/bin/disk-changer %c %o %S %a %d"
-  Device = Drive-0, Drive-1
-}
-
-Device {
-  Name = Drive-0
-  Device Type = File
-  Media Type = DDS-4
-  Archive Device = /home/kern/bacula/regress/tmp/disk-changer/drive0
-  AutomaticMount = yes;               # when device opened, read it
-  Autochanger = yes
-  Drive Index = 0
-  AlwaysOpen = yes;
-  RemovableMedia = yes;
-# Maximum File Size = 1000000
-}
-
-Device {
-  Name = Drive-1
-  Device Type = File
-  Media Type = DDS-4
-  Archive Device = /home/kern/bacula/regress/tmp/disk-changer/drive1
-  AutomaticMount = yes;               # when device opened, read it
-  Autochanger = yes
-  Drive Index = 1
-  AlwaysOpen = yes;
-  RemovableMedia = yes;
-# Maximum File Size = 1000000
-}
-
-
-# 
-# Send all messages to the Director, 
-# mount messages also are sent to the email address
-#
-Messages {
-  Name = Standard
-  director = localhost-dir = all, !terminate
-}
diff --git a/regress/scripts/bacula-sd-2disk.conf b/regress/scripts/bacula-sd-2disk.conf
deleted file mode 100644 (file)
index 0059466..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# Default Bacula Storage Daemon Configuration file
-#
-#  For Bacula release 1.39
-#
-# You may need to change the name of your tape drive
-#   on the "Archive Device" directive in the Device
-#   resource.  If you change the Name and/or the 
-#   "Media Type" in the Device resource, please ensure
-#   that dird.conf has corresponding changes.
-#
-
-Storage {                             # definition of myself
-  Name = localhost-sd
-  SDPort = 8103                  # Director's port      
-  WorkingDirectory = "/home/kern/bacula/regress/working"
-  Pid Directory = "/home/kern/bacula/regress/working"
-  Subsys Directory = "/home/kern/bacula/regress/working"
-}
-
-#
-# List Directors who are permitted to contact Storage daemon
-#
-Director {
-  Name = localhost-dir
-  Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
-}
-
-#
-# Devices supported by this Storage daemon
-# To connect, the Director's bacula-dir.conf must have the
-#  same Name and MediaType. 
-#
-Autochanger {
-  Name = DDS-4
-  Changer Device = /home/kern/bacula/regress/tmp/disk-changer/conf
-  Changer Command ="/home/kern/bacula/regress/bin/disk-changer %c %o %S %a %d"
-  Device = Drive-0
-}
-
-Device {
-  Name = Drive-0                   # 
-  Device Type = File
-  Media Type = DDS-4
-  Archive Device = /home/kern/bacula/regress/tmp/disk-changer/drive0
-  AutomaticMount = yes;               # when device opened, read it
-  Autochanger = yes
-  Drive Index = 0
-  AlwaysOpen = yes;
-  RemovableMedia = yes;
-# Maximum File Size = 1000000
-}
-
-
-# 
-# Send all messages to the Director, 
-# mount messages also are sent to the email address
-#
-Messages {
-  Name = Standard
-  director = localhost-dir = all, !terminate
-}
index 15689bba1e7fa40cea8469ed0140363596587a98..faeb4699ae545ef45d41e211e81b22bab3717575 100644 (file)
@@ -11,6 +11,7 @@ CALL tests\bscan-test
 CALL tests\bsr-opt-test
 CALL tests\compressed-test
 CALL tests\concurrent-jobs-test
+CALL tests\data-encrypt-test
 CALL tests\differential-test
 CALL tests\four-concurrent-jobs-test
 CALL tests\four-jobs-test
@@ -29,10 +30,10 @@ CALL tests\two-vol-test
 CALL tests\verify-vol-test
 REM CALL tests\weird-files2-test
 REM CALL tests\weird-files-test
-REM CALL tests\migration-job-test
-REM CALL tests\migration-jobspan-test
-REM CALL tests\migration-volume-test
-REM CALL tests\migration-time-test
+CALL tests\migration-job-test
+CALL tests\migration-jobspan-test
+CALL tests\migration-volume-test
+CALL tests\migration-time-test
 REM CALL tests\hardlink-test
 REM 
 REM The following are Virtual Disk Autochanger tests
index bdb2da5665ba6a8cd4c88929d79f136d453eaede..7302f0c73d6a03b60fd5389d85b3e15451ba347b 100644 (file)
@@ -5,7 +5,7 @@
 #   file or directory names in the Include directive of the
 #   FileSet resource.
 #
-#  For Bacula release 1.3
+#  For Bacula release 1.39 or later
 #
 #  You might also want to change the default email address
 #   from root to your address.  See the "mail" and "operator"
@@ -40,6 +40,20 @@ Job {
   SpoolData=yes
 }
 
+Job {
+  Name = "Crypto"
+  Type = Backup
+  Client=@hostname@-fd 
+  FileSet="SparseCompressedSet"
+  Storage = File
+  Messages = Standard
+  Pool = Default
+  Write Bootstrap = "@working_dir@/NightlySave.bsr"
+  Maximum Concurrent Jobs = 4
+  SpoolData=yes
+}
+
+
 Job {
   Name = "MonsterSave"
   Type = Backup
@@ -163,6 +177,7 @@ FileSet {
   Include {
     Options {
       signature=MD5 compression=GZIP
+      sparse=yes
     }
     File = </tmp/file-list
   }
index fc050c741607e14773355d0f8ac921ee877b5c76..090d518da064245b2a90b7e3ac01d27c501a25f0 100644 (file)
@@ -4,6 +4,8 @@ messages
 label storage=File1 volume=TestVolume001
 label storage=File1 volume=TestVolume002
 update Volume=TestVolume001 MaxVolBytes=3000000
+@#setdebug level=400 dir
+@#setdebug level=400 storage=File1
 run job=@JobName@ storage=File1 yes
 wait
 messages
@@ -11,7 +13,7 @@ messages
 @# now build the bsr file
 @#
 @@out@ tmp/log2.out
-restore bootstrap=@topdir@/tmp/restore.bsr where=@topdir@/tmp/bacula-restores select all storage=File1 done
+restore bootstrap=@topdir@/working/restore.bsr where=@topdir@/tmp/bacula-restores select all storage=File1 done
 no
 wait
 messages
index 7c0f6380c054e651de532d9504c6a319ceba0d43..c119764c5e302ade9f80fac44db947842bfbf20e 100644 (file)
@@ -21,7 +21,7 @@ CALL scripts\functions check_for_zombie_jobs storage=File1
 CALL scripts\functions stop_bacula
 
 MKDIR %CD%\tmp\bacula-restores
-bin\bextract -b tmp/restore.bsr -c bin/bacula-sd.conf %CD:\=/%/tmp %CD:\=/%/tmp/bacula-restores 2>&1 >nul
+bin\bextract -b working/restore.bsr -c bin/bacula-sd.conf %CD:\=/%/tmp %CD:\=/%/tmp/bacula-restores 2>&1 >nul
 SET rstat=%ERRORLEVEL%
 grep "^  Termination: *Backup OK" tmp\log1.out 2>&1 >nul
 SET bstat=%ERRORLEVEL%
index 754305fdcce807580c5932abc02420e2804b7657..5b71db8c1a1227e7cfb912935413028b77524b3c 100644 (file)
@@ -11,7 +11,7 @@ SET JobName=bscan
 CALL scripts\functions set_debug 0
 CALL scripts\functions copy_test_confs
 
-echo %CD:\=/%/build >\tmp\file-list
+ECHO %CD:\=/%/build >\tmp\file-list
 
 CALL scripts\functions change_jobname NightlySave %JobName%
 CALL scripts\functions start_test
@@ -22,7 +22,7 @@ CALL scripts\functions run_bacula
 CALL scripts\functions check_for_zombie_jobs storage=File1
 CALL scripts\functions stop_bacula
 
-echo volume=TestVolume001^|TestVolume002 >tmp\bscan.bsr
+ECHO volume=TestVolume001^|TestVolume002 >tmp\bscan.bsr
 
 IF %debug% EQU 1 (
    bin\bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf %CD:\=/%/tmp | tools\tee tmp\log.out
index bff606925a848508208abdbf75470d5b88bfade6..2097c6124f2f983e70bba8666d7a91b85ab4cbd7 100644 (file)
@@ -8,7 +8,7 @@ SET JobName=compressed
 CALL scripts\functions set_debug 0
 CALL scripts\functions copy_test_confs
 
-echo %CD:\=/%/build >\tmp\file-list
+ECHO %CD:\=/%/build >\tmp\file-list
 
 CALL scripts\functions change_jobname CompressedTest %JobName%
 CALL scripts\functions start_test
diff --git a/regress/win32/tests/filed-crypto-test b/regress/win32/tests/filed-crypto-test
deleted file mode 100644 (file)
index 0189624..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-#
-# Run a simple backup (with encryption) of the Bacula build directory
-#   then verify the signatures.
-#
-TestName="filed-crypto-test"
-JobName=Crypto
-. scripts/functions
-set_debug 0
-
-scripts/cleanup
-scripts/copy-crypto-confs
-echo "${cwd}/build" >/tmp/file-list
-
-change_jobname NightlySave $JobName
-start_test
-
-cat <<END_OF_DATA >tmp/bconcmds
-@$out /dev/null
-messages
-@$out tmp/log1.out
-setdebug level=1 storage=File sd
-label storage=File volume=TestVolume001
-run job=$JobName yes
-wait
-messages
-@# 
-@# now do a restore
-@#
-@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores storage=File
-5
-mark *
-done
-yes
-wait
-messages
-@$out
-quit
-END_OF_DATA
-
-run_bacula
-sleep 2
-check_for_zombie_jobs storage=File 
-stop_bacula
-
-check_two_logs
-check_restore_diff
-end_test
diff --git a/regress/win32/tests/migration-job-test b/regress/win32/tests/migration-job-test
deleted file mode 100644 (file)
index d243c99..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory then migrate it
-#   to another device.
-#
-# This script uses the virtual disk autochanger
-#
-TestName="migration-job-test"
-JobName=MigrationJobSave
-. scripts/functions
-set_debug 0
-
-. config.out
-
-scripts/cleanup
-scripts/copy-migration-confs
-scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
-
-change_jobname NightlySave $JobName
-start_test
-
-#
-# Note, we first backup into Pool Default, 
-#          then Migrate into Pool Full. 
-#              Pool Default uses Storage=File
-#              Pool Full    uses Storage=DiskChanger
-
-# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
-@output
-messages
-@$out tmp/log1.out
-label storage=File volume=FileVolume001 Pool=Default
-label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
-label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
-list volumes
-@# run two jobs (both will be migrated)
-run job=$JobName yes
-run job=$JobName yes
-wait
-list volumes
-@# should migrate two jobs
-run job=migrate-job yes
-list volumes
-wait
-messages
-wait
-@# 
-@# now do a restore
-@#
-@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
-unmark *
-mark *
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-
-run_bacula
-check_for_zombie_jobs storage=File
-stop_bacula
-
-check_two_logs
-check_restore_diff
-end_test
diff --git a/regress/win32/tests/migration-job-test.cmd b/regress/win32/tests/migration-job-test.cmd
new file mode 100644 (file)
index 0000000..d851fde
--- /dev/null
@@ -0,0 +1,37 @@
+REM
+REM Run a simple backup of the Bacula build directory then migrate it
+REM   to another device.
+REM
+REM This script uses the virtual disk autochanger
+REM
+SET TestName=migration-job-test
+SET JobName=MigrationJobSave
+
+CALL scripts\functions set_debug 0
+
+CALL config_out
+
+CALL scripts\cleanup
+CALL scripts\copy-migration-confs
+CALL scripts\prepare-two-disks
+ECHO %CD:\=/%/build >\tmp\file-list
+
+CALL scripts\functions change_jobname NightlySave %JobName%
+CALL scripts\functions start_test
+
+REM
+REM Note, we first backup into Pool Default, 
+REM          then Migrate into Pool Full. 
+REM              Pool Default uses Storage=File
+REM              Pool Full    uses Storage=DiskChanger
+
+REM Write out bconsole commands
+sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\migration-job-test.bscr >tmp\bconcmds
+
+CALL scripts\functions run_bacula
+CALL scripts\functions check_for_zombie_jobs storage=File
+CALL scripts\functions stop_bacula
+
+CALL scripts\functions check_two_logs
+CALL scripts\functions check_restore_diff
+CALL scripts\functions end_test
diff --git a/regress/win32/tests/migration-jobspan-test b/regress/win32/tests/migration-jobspan-test
deleted file mode 100644 (file)
index 838cb00..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory then migrate it
-#   to another device.
-#
-# Test migrating a job that spans two Volumes
-#
-# This script uses the virtual disk autochanger
-#
-TestName="migration-jobspan-test"
-JobName=MigrationJobSpanSave
-. scripts/functions
-set_debug 0
-
-. config.out
-
-scripts/cleanup
-scripts/copy-migration-confs
-scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
-cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
-sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
-
-
-change_jobname NightlySave $JobName
-start_test
-
-#
-# Note, we first backup into Pool Default, 
-#          then Migrate into Pool Full. 
-#              Pool Default uses Storage=File
-#              Pool Full    uses Storage=DiskChanger
-
-# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
-@output
-messages
-@$out tmp/log1.out
-@#setdebug level=100 dir
-@#setdebug level=100 storage=File
-label storage=File volume=FileVolume001 Pool=Default
-label storage=File volume=FileVolume002 Pool=Default
-update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
-label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
-label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
-list volumes
-@#
-run job=$JobName yes
-@#run job=$JobName yes
-wait
-list volumes
-@# should migrate both Volumes
-run job=migrate-job yes
-wait
-list volumes
-list jobs
-messages
-wait
-@# 
-@# now do a restore
-@#
-@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
-unmark *
-mark *
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-
-run_bacula
-check_for_zombie_jobs storage=File
-stop_bacula
-
-check_two_logs
-check_restore_diff
-end_test
diff --git a/regress/win32/tests/migration-jobspan-test.cmd b/regress/win32/tests/migration-jobspan-test.cmd
new file mode 100644 (file)
index 0000000..e21a19a
--- /dev/null
@@ -0,0 +1,42 @@
+REM
+REM Run a simple backup of the Bacula build directory then migrate it
+REM   to another device.
+REM
+REM Test migrating a job that spans two Volumes
+REM
+REM This script uses the virtual disk autochanger
+REM
+SET TestName=migration-jobspan-test
+SET JobName=MigrationJobSpanSave
+
+CALL scripts\functions set_debug 0
+
+CALL config_out
+
+CALL scripts\cleanup
+CALL scripts\copy-migration-confs
+CALL scripts\prepare-two-disks
+
+ECHO %CD:\=/%/build >\tmp\file-list
+
+COPY bin\bacula-sd.conf tmp\1
+sed "s;# Maximum File Size;  Maximum File Size;" %CD%\tmp\1 >%CD%\bin\bacula-sd.conf
+
+CALL scripts\functions change_jobname NightlySave %JobName%
+CALL scripts\functions start_test
+
+REM
+REM Note, we first backup into Pool Default, 
+REM          then Migrate into Pool Full. 
+REM              Pool Default uses Storage=File
+REM              Pool Full    uses Storage=DiskChanger
+
+sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\migration-jobspan-test.bscr >tmp\bconcmds
+
+CALL scripts\functions run_bacula
+CALL scripts\functions check_for_zombie_jobs storage=File
+CALL scripts\functions stop_bacula
+
+CALL scripts\functions check_two_logs
+CALL scripts\functions check_restore_diff
+CALL scripts\functions end_test
diff --git a/regress/win32/tests/migration-occupancy-test b/regress/win32/tests/migration-occupancy-test
deleted file mode 100644 (file)
index e5c9e35..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory then migrate it
-#   to another device.
-#
-# This script uses the virtual disk autochanger
-#
-TestName="migration-occupancy-test"
-JobName=MigrationJobSave
-. scripts/functions
-set_debug 0
-
-. config.out
-
-scripts/cleanup
-scripts/copy-migration-confs
-scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
-
-change_jobname NightlySave $JobName
-start_test
-
-#
-# Note, we first backup into Pool Default, 
-#          then Migrate into Pool Full. 
-#              Pool Default uses Storage=File
-#              Pool Full    uses Storage=DiskChanger
-
-# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
-@output
-messages
-@$out tmp/log1.out
-label storage=File volume=FileVolume001 Pool=Default
-label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
-label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
-list volumes
-@# run two jobs (both will be migrated)
-run job=$JobName yes
-run job=$JobName yes
-wait
-update volume=FileVolume001 VolStatus=Used
-list volumes
-@# should migrate two jobs
-run job=migrate-occupancy yes
-list volumes
-wait
-messages
-wait
-@# 
-@# now do a restore
-@#
-@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
-unmark *
-mark *
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-
-run_bacula
-check_for_zombie_jobs storage=File
-stop_bacula
-
-check_two_logs
-check_restore_diff
-end_test
diff --git a/regress/win32/tests/migration-occupancy-test.cmd b/regress/win32/tests/migration-occupancy-test.cmd
new file mode 100644 (file)
index 0000000..d68dac5
--- /dev/null
@@ -0,0 +1,36 @@
+REM
+REM Run a simple backup of the Bacula build directory then migrate it
+REM   to another device.
+REM
+REM This script uses the virtual disk autochanger
+REM
+SET TestName=migration-occupancy-test
+SET JobName=MigrationJobSave
+
+CALL scripts\functions set_debug 0
+
+CALL config_out
+
+CALL scripts\cleanup
+CALL scripts\copy-migration-confs
+CALL scripts\prepare-two-disks
+ECHO %CD:\=/%/build >\tmp\file-list
+
+CALL scripts\functions change_jobname NightlySave %JobName%
+CALL scripts\functions start_test
+
+REM
+REM Note, we first backup into Pool Default, 
+REM          then Migrate into Pool Full. 
+REM              Pool Default uses Storage=File
+REM              Pool Full    uses Storage=DiskChanger
+
+sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\migration-occupancy-test.bscr >tmp\bconcmds
+
+CALL scripts\functions run_bacula
+CALL scripts\functions check_for_zombie_jobs storage=File
+CALL scripts\functions stop_bacula
+
+CALL scripts\functions check_two_logs
+CALL scripts\functions check_restore_diff
+CALL scripts\functions end_test
diff --git a/regress/win32/tests/migration-time-test b/regress/win32/tests/migration-time-test
deleted file mode 100644 (file)
index 0b57426..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-#
-# Run a simple backup of the Bacula build directory then migrate it
-#   to another device.
-#
-# This script uses the virtual disk autochanger
-#
-TestName="migration-time-test"
-JobName=MigrationJobSave
-. scripts/functions
-set_debug 0
-
-. config.out
-
-scripts/cleanup
-scripts/copy-migration-confs
-scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
-
-change_jobname NightlySave $JobName
-start_test
-
-#
-# Note, we first backup into Pool Default, 
-#          then Migrate into Pool Full. 
-#              Pool Default uses Storage=File
-#              Pool Full    uses Storage=DiskChanger
-
-# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
-@output
-messages
-@$out tmp/log1.out
-label storage=File volume=FileVolume001 Pool=Default
-label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
-label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
-list volumes
-@# run three jobs
-run job=$JobName level=Full yes
-run job=$JobName level=Full yes
-run job=$JobName level=Full yes
-wait
-update volume=FileVolume001 VolStatus=Used
-sql
-update Job SET RealEndTime='2004-01-01 12:01:01' WHERE JobId IN (2,3);
-
-llist jobid=2,3
-list jobs
-list volumes
-@# should migrate only jobid=2 and 3
-run job=migrate-time yes
-wait
-messages
-wait
-list jobs
-list volumes
-@# 
-@# now do a restore
-@#
-@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
-unmark *
-mark *
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-
-run_bacula
-check_for_zombie_jobs storage=File
-stop_bacula
-
-check_two_logs
-check_restore_diff
-end_test
diff --git a/regress/win32/tests/migration-time-test.cmd b/regress/win32/tests/migration-time-test.cmd
new file mode 100644 (file)
index 0000000..473ebe6
--- /dev/null
@@ -0,0 +1,37 @@
+REM
+REM Run a simple backup of the Bacula build directory then migrate it
+REM   to another device.
+REM
+REM This script uses the virtual disk autochanger
+REM
+SET TestName=migration-time-test
+SET JobName=MigrationJobSave
+
+CALL scripts\functions set_debug 0
+
+CALL config_out
+
+CALL scripts\cleanup
+CALL scripts\copy-migration-confs
+CALL scripts\prepare-two-disks
+
+ECHO %CD:\=/%/build >\tmp\file-list
+
+CALL scripts\functions change_jobname NightlySave %JobName%
+CALL scripts\functions start_test
+
+REM
+REM Note, we first backup into Pool Default, 
+REM          then Migrate into Pool Full. 
+REM              Pool Default uses Storage=File
+REM              Pool Full    uses Storage=DiskChanger
+
+sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\migration-time-test.bscr >tmp\bconcmds
+
+CALL scripts\functions run_bacula
+CALL scripts\functions check_for_zombie_jobs storage=File
+CALL scripts\functions stop_bacula
+
+CALL scripts\functions check_two_logs
+CALL scripts\functions check_restore_diff
+CALL scripts\functions end_test
diff --git a/regress/win32/tests/migration-volume-test b/regress/win32/tests/migration-volume-test
deleted file mode 100644 (file)
index e2d66b6..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-#
-# Run a backup of the Bacula build directory on two Volumes
-#   then migrate it to another device.             
-#
-# This script uses the virtual disk autochanger
-#
-TestName="migration-volume-test"
-JobName=MigVolBackup
-. scripts/functions
-set_debug 0
-
-. config.out
-
-scripts/cleanup
-scripts/copy-migration-confs
-scripts/prepare-two-disks
-echo "${cwd}/build" >/tmp/file-list
-#cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
-#sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
-
-change_jobname NightlySave $JobName
-start_test
-
-#
-# Note, we first backup into Pool Default, 
-#          then Migrate into Pool Full. 
-#              Pool Default uses Storage=File
-#              Pool Full    uses Storage=DiskChanger
-
-# Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
-@output
-messages
-@$out tmp/log1.out
-label storage=File volume=FileVolume001 Pool=Default
-label storage=File volume=FileVolume002 Pool=Default
-update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
-label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
-label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
-list volumes
-@# 
-run job=$JobName yes
-wait
-run job=$JobName yes
-wait
-update volume=FileVolume001 VolStatus=Used
-update volume=FileVolume002 VolStatus=Used
-list volumes
-@# should migrate two jobs
-@# setdebug level=11 dir
-run job=migrate-volume yes
-list volumes
-@sleep 3
-status storage=DiskChanger
-@sleep 1
-status storage=DiskChanger
-@sleep 1
-status storage=DiskChanger
-wait
-messages
-@# 
-@# now do a restore
-@#
-@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
-unmark *
-mark *
-done
-yes
-wait
-messages
-@output
-quit
-END_OF_DATA
-
-run_bacula
-check_for_zombie_jobs storage=File
-stop_bacula
-
-check_two_logs
-check_restore_diff
-end_test
diff --git a/regress/win32/tests/migration-volume-test.cmd b/regress/win32/tests/migration-volume-test.cmd
new file mode 100644 (file)
index 0000000..86505d4
--- /dev/null
@@ -0,0 +1,40 @@
+REM
+REM Run a backup of the Bacula build directory on two Volumes
+REM   then migrate it to another device.             
+REM
+REM This script uses the virtual disk autochanger
+REM
+SET TestName=migration-volume-test
+SET JobName=MigVolBackup
+
+CALL scripts\functions set_debug 0 
+
+CALL config_out
+
+CALL scripts\cleanup
+CALL scripts\copy-migration-confs
+CALL scripts\prepare-two-disks
+
+ECHO %CD:\=/%/build >\tmp\file-list
+
+REM COPY bin\bacula-sd.conf tmp\1
+REM sed "s;# Maximum File Size;  Maximum File Size;" tmp\1 >bin\bacula-sd.conf
+
+CALL scripts\functions change_jobname NightlySave %JobName%
+CALL scripts\functions start_test
+
+REM
+REM Note, we first backup into Pool Default, 
+REM          then Migrate into Pool Full. 
+REM              Pool Default uses Storage=File
+REM              Pool Full    uses Storage=DiskChanger
+
+sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\migration-volume-test.bscr >tmp\bconcmds
+
+CALL scripts\functions run_bacula
+CALL scripts\functions check_for_zombie_jobs storage=File
+CALL scripts\functions stop_bacula
+
+CALL scripts\functions check_two_logs
+CALL scripts\functions check_restore_diff
+CALL scripts\functions end_test
index 9bdb24ff452dd094636c535500d126996d3fdcc5..6fdfdbd60f9e2660d279d4165eebab73df6e9205 100644 (file)
@@ -8,7 +8,7 @@ REM
 SET TestName=restore-disk-seek-test
 SET JobName=restore-disk-seek
 
-CALL scripts\functions set_debug 0
+CALL scripts\functions set_debug 1
 CALL scripts\functions copy_test_confs
 
 ECHO %CD:\=/%/tmp/build >\tmp\file-list
@@ -17,7 +17,10 @@ IF EXIST tmp\build RD /s /q  tmp\build
 MKDIR tmp\build
 
 REM Copy only the .c files (to be restored)
-COPY build\src\dird\*.c tmp\build >nul 2>&1
+REM  set files to "*.c" for all c files
+SET files=ua_tree.c ua_update.c
+REM SET files=*.c
+FOR %%i in ( %files% ) DO COPY build\src\dird\%%i tmp\build >nul 2>&1
 DIR /b tmp\build >tmp\1
 sed -e "s;^;%CD:\=/%/tmp/build/;" tmp\1 >tmp\restore-list
 
@@ -45,7 +48,7 @@ CALL scripts\functions stop_bacula
 REM Now setup a control directory of only what we *should* restore
 RD /s /q tmp\build
 MKDIR tmp\build
-COPY build\src\dird\*.c tmp\build >nul 2>&1
+FOR %%i in ( %files% ) DO COPY build\src\dird\%%i tmp\build >nul 2>&1
 
 CALL scripts\functions check_two_logs
 CALL scripts\functions check_restore_tmp_build_diff
index cdc63aca8562930df489624783cf4aab97f18219..52cbaffb77662f4450b5430241018ec35cd80e0e 100644 (file)
@@ -10,7 +10,7 @@ SET JobName=SpanVol
 CALL scripts\functions set_debug 0
 CALL scripts\functions copy_test_confs
 
-echo %CD:\=/%/build >\tmp\file-list
+ECHO %CD:\=/%/build >\tmp\file-list
 
 CALL scripts\functions change_jobname NightlySave %JobName%
 CALL scripts\functions start_test
index f01e19aaed970849534afe70526f1b6c9c47fc58..e8b701dcf14c201c04427fe2343a998147c73fa1 100644 (file)
@@ -8,7 +8,7 @@ SET JobName=Sparse-conpressed
 CALL scripts\functions set_debug 0
 CALL scripts\functions copy_test_confs
 
-echo %CD:\=/%/build >\tmp\file-list
+ECHO %CD:\=/%/build >\tmp\file-list
 
 CALL scripts\functions start_test
 
index 54784e4f05b5d4e0dcbf12f1cb0daee12b67a060..e2d9904c362dcb9d0020e47da0d3a37574f51129 100644 (file)
@@ -21,7 +21,7 @@ CALL scripts\prepare-two-disks
  
 REM Make a relatively large backup set 5 x source code directory
 REM  Reduced to 1 for portable
-echo %CD:\=/%/build >\tmp\file-list
+ECHO %CD:\=/%/build >\tmp\file-list
 
 CALL scripts\functions start_test
 
index a363fcccf80664780d2dc493d1f1928004221d89..ce59794572bc6153ca3045ebd62e18c6110d3b5d 100644 (file)
@@ -8,7 +8,7 @@ SET JobName=TwoVol
 CALL scripts\functions set_debug 0
 CALL scripts\functions copy_test_confs
 
-echo %CD:\=/%/build >\tmp\file-list
+ECHO %CD:\=/%/build >\tmp\file-list
 
 CALL scripts\functions change_jobname NightlySave %JobName%
 CALL scripts\functions start_test
index 1528c5f26f7e3dd53b945361cc5374ad9b08727e..62e80ecaa909edfc519ef37549f61deb0e0a9da3 100644 (file)
@@ -18,7 +18,7 @@ CALL scripts\cleanup
 CALL scripts\copy-2tape-confs
 CALL scripts\prepare-two-tapes
  
-ECHO "%CD:\=/%/build" >\tmp\file-list
+ECHO %CD:\=/%/build >\tmp\file-list
 
 COPY bin\bacula-sd.conf tmp\1
 sed -e "s%# Maximum File Size%  Maximum File Size%g" >bin\bacula-sd.conf
index cef3887c0d0ba900642078f32cdeb558531c7297..9bfe9c88daa03397e649707024e1650249378367 100644 (file)
@@ -8,7 +8,7 @@ REM   Note we use the viritual disk autochanger
 REM 
 SET TestName=two-volume-test
 SET JobName=TwoVolume
-CALL scripts\functions set_debug 0
+CALL scripts\functions set_debug 1
 CALL config_out
 
 CALL scripts\cleanup