wierd-files
diff
tmp
+working
--- /dev/null
+#!/bin/sh
+#
+# Cleanup left over files -- both before and after test run
+#
+rm -rf /tmp/TestVolume001 /tmp/bacula-restores
+rm -rf tmp/original tmp/bacula-restores tmp/SmallVols* tmp/TestVolume*
+rm -rf tmp/restored tmp/largefile
# Create sed command script
echo "s%@sbindir@%${cwd}/bin%g" >${out}
echo "s%@scriptdir@%${cwd}/bin%g" >>${out}
-echo "s%@working_dir@%${cwd}/bin/working%g" >>${out}
+echo "s%@working_dir@%${cwd}/working%g" >>${out}
echo "s%@piddir@%${cwd}/bin/working%g" >>${out}
echo "s%@subsysdir@%${cwd}/bin/working%g" >>${out}
echo "s%@job_email@%${1}%g" >>${out}
./configure \
--sbindir=$1/bin \
--sysconfdir=$1/bin \
- --with-pid-dir=$1/bin/working \
- --with-subsys-dir=$1/bin/working \
+ --with-pid-dir=$1/working \
+ --with-subsys-dir=$1/working \
--enable-smartalloc \
--with-sqlite=$2 \
- --with-working-dir=$1/bin/working \
+ --with-working-dir=$1/working \
--with-dump-email=$3 \
--with-job-email=$3 \
--with-baseport=8101
#
cwd=`pwd`
scripts/copy-confs
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
+scripts/cleanup
bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
bin/make_sqlite_tables
echo " "
echo " "
echo " === Starting Backup Bacula Test ==="
+echo " === Starting Backup Bacula Test ===" >>tmp/log
echo " "
bin/bacula start
else
echo " ===== Backup Bacula Test OK ===== "
echo " ===== Backup Bacula Test OK ===== " >>test.out
- rm -rf /tmp/bacula-restores /tmp/TestVolume001
+ scripts/cleanup
fi
#
cwd=`pwd`
scripts/copy-test-confs
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
+scripts/cleanup
echo "${cwd}/build" >/tmp/file-list
bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
echo " "
echo " "
echo " === Starting compressed-test ==="
+echo " === Starting compressed-test ===" >>tmp/log
echo " "
bin/bacula start
else
echo " ===== compressed-test Bacula source OK ===== "
echo " ===== compressed-test OK ===== " >>test.out
- rm -rf /tmp/bacula-restores /tmp/TestVolume001
+ scripts/cleanup
fi
#
cwd=`pwd`
scripts/copy-testa-confs
-rm -rf tmp/SmallVols* tmp/bacula-restores tmp/largefile
+scripts/cleanup
echo "${cwd}/tmp/largefile" >/tmp/file-list
# Create 56MB file with random data
echo "Creating a 56MB file with random data ..."
echo " "
echo " "
echo " === Starting two-vol-test ==="
+echo " === Starting two-vol-test ===" >>tmp/log
echo " "
bin/bacula start
else
echo " ===== six-vol-test Bacula source OK ===== "
echo " ===== six-vol-test OK ===== " >>test.out
- rm -rf tmp/bacula-restores tmp/SmallVols* tmp/largefile
+ scripts/cleanup
fi
#
cwd=`pwd`
scripts/copy-test-confs
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
+scripts/cleanup
echo "${cwd}/build" >/tmp/file-list
bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
echo " "
echo " "
echo " === Starting sparse-compressed-test ==="
+echo " === Starting sparse-compressed-test ===" >>tmp/log
echo " "
bin/bacula start
else
echo " ===== sparse-compressed-test Bacula source OK ===== "
echo " ===== sparse-compressed-test OK ===== " >>test.out
- rm -rf /tmp/bacula-restores /tmp/TestVolume001
+ scripts/cleanup
fi
#
cwd=`pwd`
scripts/copy-test-confs
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
+scripts/cleanup
echo "${cwd}/build" >/tmp/file-list
bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
echo " "
echo " "
echo " === Starting sparse-test ==="
+echo " === Starting sparse-test ===" >>tmp/log
echo " "
bin/bacula start
else
echo " ===== sparse-test Bacula source OK ===== "
echo " ===== sparse-test OK ===== " >>test.out
- rm -rf /tmp/bacula-restores /tmp/TestVolume001
+ scripts/cleanup
fi
#
cwd=`pwd`
scripts/copy-test-confs
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
+scripts/cleanup
echo "${cwd}/build" >/tmp/file-list
bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
echo " "
echo " "
echo " === Starting two-jobs-test ==="
+echo " === Starting two-jobs-test ===" >>tmp/log
echo " "
bin/bacula start
else
echo " ===== two-jobs-test Bacula source OK ===== "
echo " ===== two-jobs-test OK ===== " >>test.out
- rm -rf /tmp/bacula-restores /tmp/TestVolume001
+ scripts/cleanup
fi
#
cwd=`pwd`
scripts/copy-test-confs
-rm -rf tmp/TestVolume001 tmp/TestVolume002 tmp/bacula-restores
+scripts/cleanup
echo "${cwd}/build" >/tmp/file-list
bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
echo " "
echo " "
echo " === Starting two-vol-test ==="
+echo " === Starting two-vol-test ===" >tmp/log
echo " "
bin/bacula start
else
echo " ===== two-vol-test Bacula source OK ===== "
echo " ===== two-vol-test OK ===== " >>test.out
- rm -rf tmp/bacula-restores tmp/TestVolume001 tmp/TestVolume002
+ scripts/cleanup
fi
#
cwd=`pwd`
scripts/copy-test-confs
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
-rm -f tmp/original
+scripts/cleanup
+echo "${cwd}/build" >/tmp/file-list
bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
bin/make_sqlite_tables
echo " "
echo " "
echo " === Starting verify Volume Test ==="
+echo " === Starting verify Volume Test ===" >>tmp/log
echo " "
bin/bacula start
else
echo " ===== Verify Volume Test OK ===== "
echo " ===== Verify Volume Test OK ===== " >>test.out
- rm -rf /tmp/bacula-restores /tmp/TestVolume001
- rm -f ${cwd}/tmp/original
+ scripts/cleanup
fi