]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/cleanup-2tape.in
Reduce wait time in regression RunScripts
[bacula/bacula] / regress / scripts / cleanup-2tape.in
index 06583b5f69fa00115ac1ac998ecef738a55a9909..8fa197d4df7b2e0b6ca71afec068f9dccd7a1a1a 100755 (executable)
@@ -2,31 +2,8 @@
 #
 # Cleanup left over files -- both before and after test run
 #
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores /tmp/Small*
-rm -rf tmp/original tmp/bacula-restores tmp/Small* tmp/TestVolume*
-rm -rf tmp/restored tmp/largefile tmp/bscan.bsr tmp/log*.out
 
-if ! test x@autochanger@ = x/dev/null; then
-   drive=`bin/mtx-changer @autochanger@ loaded`
-   if ! test x$drive = x2; then
-      bin/mtx-changer @autochanger@ unload
-      bin/mtx-changer @autochanger@ load 2
-   fi
-   mt -f @tape_drive@ rewind
-   mt -f @tape_drive@ weof
-fi
+. scripts/functions
 
-
-#
-# If we have an autochanger always load tape in slot 1
-#
-if ! test x@autochanger@ = x/dev/null; then
-   drive=`bin/mtx-changer @autochanger@ loaded`
-   if ! test x$drive = x1; then
-      bin/mtx-changer @autochanger@ unload
-      bin/mtx-changer @autochanger@ load 1
-   fi
-fi
-
-mt -f @tape_drive@ rewind
-mt -f @tape_drive@ weof
+scripts/cleanup
+scripts/prepare-two-tapes