3 # Copyright (C) 2000-2016 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Cleanup left over files -- both before and after test run
12 rm -rf ${tmp}/FileVolume*
13 rm -rf ${tmp}/TestVolume001 ${tmp}bacula-restores ${tmp}/Small*
14 rm -rf ${tmp}/sed_tmp ${tmp}/file-list
16 rm -rf ${working}/log ${tmp}/TEST-*
17 rm -rf ${working}/log ${tmp}/Backup-*
18 rm -rf ${working}/*.bsr ${working}/log*.sd
19 rm -rf ${working}/*.trace ${working}/*.traceback ${working}/*.state
22 rm -rf ${tmp}disk-changer
23 rm -f ${cwd}/bin/plugins/test-plugin-fd.so
25 find . -name "gigaslam.gif" -exec rm -f {} \;
28 # bin directory does not always exist
29 if [ -d ${bin} ] ; then
30 if [ -f ${bin}/bacula ] ; then
31 ${bin}/bacula stop -KILL 2>&1 >/dev/null
36 ./drop_bacula_tables >/dev/null 2>&1
37 ./make_bacula_tables >/dev/null 2>&1
38 ./grant_bacula_privileges >/dev/null 2>&1
41 if [ x$USE_VTAPE = xyes ]; then
45 if [ x$FORCE_DEDUP = xyes ]; then
47 rm -rf ${working}/ddefd
50 # Remove cloud test volumes
51 if [ x$FORCE_CLOUD = xyes ]; then
52 drv=`echo $CLOUD_DRIVER | tr 'A-Z' 'a-z'`
53 if [ "${drv}" = s3 -o "${drv}" = fakes3 ]; then
54 if [ x${CLOUD_HOSTNAME} != x ]; then
55 if [ x${CLOUD_PROTOCOL} = xHTTPS ]; then
58 endpoint="--endpoint-url=http://${CLOUD_HOSTNAME}"
61 if [ x${CLOUD_REGION} != x ]; then
62 region="--region ${CLOUD_REGION}"
66 aws configure set default.s3.signature_version s3v4
67 aws s3 rm s3://${CLOUD_BUCKETNAME} $endpoint --recursive --include 'TestVol*' --include 'Vol*' $region 2>/dev/null >/dev/null