X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Fscripts%2Fcleanup;h=c501428061b7495b673262785fb8287c57de5ad5;hb=d66b1d4fe6b19fdf29ead13b922f65601bd478a9;hp=2cb9f56efab70602cfb4f7d035d1d48d245147c2;hpb=83b48c47a346bd3fd2904ec593c6a27277a97009;p=bacula%2Fbacula diff --git a/regress/scripts/cleanup b/regress/scripts/cleanup index 2cb9f56efa..c501428061 100755 --- a/regress/scripts/cleanup +++ b/regress/scripts/cleanup @@ -2,10 +2,33 @@ # # 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 -rm -rf /tmp/sed_tmp /tmp/file-list -rm -rf tmp/build tmp/restore-list tmp/restore2-list -rm -rf tmp/fd.out tmp/dir.out tmp/sd.out -rm -rf working/log +. scripts/functions +cwd=`pwd` +rm -rf ${tmp}/FileVolume* +rm -rf ${tmp}/TestVolume001 ${tmp}bacula-restores ${tmp}/Small* +rm -rf ${tmp}/sed_tmp ${tmp}/file-list +rm -rf ${tmp}/* +rm -rf ${working}/log ${tmp}/TEST-* +rm -rf ${working}/log ${tmp}/Backup-* +rm -rf ${working}/*.bsr ${working}/log*.sd +rm -rf ${working}/*.trace ${working}/*.traceback ${working}/*.bactrace +rm -rf ${tmp}disk-changer +rm -f ${cwd}/bin/plugins/test-plugin-fd.so +find . -name "gigaslam.gif" -exec rm -f {} \; + + +# bin directory does not always exist +if [ -d ${bin} ] ; then + if [ -f ${bin}/bacula ] ; then + ${bin}/bacula stop 2>&1 >/dev/null + fi + cd ${scripts} + ./drop_bacula_tables >/dev/null 2>&1 + ./make_bacula_tables >/dev/null 2>&1 + ./grant_bacula_privileges >/dev/null 2>&1 + cd ${cwd} +fi + +if [ x$USE_VTAPE = xyes ]; then + rm -rf ${working}/ach +fi