From cd51ba8156cc836fd69adb448bdd3067905efbb3 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 25 May 2003 17:30:08 +0000 Subject: [PATCH] New working dir git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@540 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/.cvsignore | 1 + regress/scripts/cleanup | 7 +++++++ regress/scripts/do_sed | 2 +- regress/scripts/regress-config | 6 +++--- regress/tests/backup-bacula-test | 5 +++-- regress/tests/compressed-test | 5 +++-- regress/tests/six-vol-test | 5 +++-- regress/tests/sparse-compressed-test | 5 +++-- regress/tests/sparse-test | 5 +++-- regress/tests/two-jobs-test | 5 +++-- regress/tests/two-vol-test | 5 +++-- regress/tests/verify-vol-test | 8 ++++---- 12 files changed, 37 insertions(+), 22 deletions(-) create mode 100755 regress/scripts/cleanup diff --git a/regress/.cvsignore b/regress/.cvsignore index 5a3bc0f94e..6f0d68f2ee 100644 --- a/regress/.cvsignore +++ b/regress/.cvsignore @@ -4,3 +4,4 @@ test.out wierd-files diff tmp +working diff --git a/regress/scripts/cleanup b/regress/scripts/cleanup new file mode 100755 index 0000000000..7c8004e5c1 --- /dev/null +++ b/regress/scripts/cleanup @@ -0,0 +1,7 @@ +#!/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 diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 69bd330c09..03646b4905 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -4,7 +4,7 @@ cwd=`pwd` # 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} diff --git a/regress/scripts/regress-config b/regress/scripts/regress-config index 1d4737c1fc..0241deb532 100755 --- a/regress/scripts/regress-config +++ b/regress/scripts/regress-config @@ -7,11 +7,11 @@ CFLAGS="-g -O2 -Wall" \ ./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 diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test index a8039eebd0..3e81db61a0 100755 --- a/regress/tests/backup-bacula-test +++ b/regress/tests/backup-bacula-test @@ -5,7 +5,7 @@ # 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 @@ -13,6 +13,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting Backup Bacula Test ===" +echo " === Starting Backup Bacula Test ===" >>tmp/log echo " " bin/bacula start @@ -51,5 +52,5 @@ if [ $? != 0 ] ; then else echo " ===== Backup Bacula Test OK ===== " echo " ===== Backup Bacula Test OK ===== " >>test.out - rm -rf /tmp/bacula-restores /tmp/TestVolume001 + scripts/cleanup fi diff --git a/regress/tests/compressed-test b/regress/tests/compressed-test index 82ff4f54a0..bc37c03f7a 100755 --- a/regress/tests/compressed-test +++ b/regress/tests/compressed-test @@ -5,7 +5,7 @@ # 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 @@ -14,6 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting compressed-test ===" +echo " === Starting compressed-test ===" >>tmp/log echo " " bin/bacula start @@ -50,5 +51,5 @@ if [ $? != 0 ] ; then else echo " ===== compressed-test Bacula source OK ===== " echo " ===== compressed-test OK ===== " >>test.out - rm -rf /tmp/bacula-restores /tmp/TestVolume001 + scripts/cleanup fi diff --git a/regress/tests/six-vol-test b/regress/tests/six-vol-test index 1c369e0c25..2048f7507e 100755 --- a/regress/tests/six-vol-test +++ b/regress/tests/six-vol-test @@ -5,7 +5,7 @@ # 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 ..." @@ -18,6 +18,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting two-vol-test ===" +echo " === Starting two-vol-test ===" >>tmp/log echo " " bin/bacula start @@ -50,5 +51,5 @@ if [ $? != 0 ] ; then 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 diff --git a/regress/tests/sparse-compressed-test b/regress/tests/sparse-compressed-test index d6e826300b..4087b6181f 100755 --- a/regress/tests/sparse-compressed-test +++ b/regress/tests/sparse-compressed-test @@ -5,7 +5,7 @@ # 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 @@ -14,6 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting sparse-compressed-test ===" +echo " === Starting sparse-compressed-test ===" >>tmp/log echo " " bin/bacula start @@ -51,5 +52,5 @@ if [ $? != 0 ] ; then 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 diff --git a/regress/tests/sparse-test b/regress/tests/sparse-test index b8ed84ef80..8b706ebf9c 100755 --- a/regress/tests/sparse-test +++ b/regress/tests/sparse-test @@ -5,7 +5,7 @@ # 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 @@ -14,6 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting sparse-test ===" +echo " === Starting sparse-test ===" >>tmp/log echo " " bin/bacula start @@ -50,5 +51,5 @@ if [ $? != 0 ] ; then else echo " ===== sparse-test Bacula source OK ===== " echo " ===== sparse-test OK ===== " >>test.out - rm -rf /tmp/bacula-restores /tmp/TestVolume001 + scripts/cleanup fi diff --git a/regress/tests/two-jobs-test b/regress/tests/two-jobs-test index e2671141b1..fc66da77e9 100755 --- a/regress/tests/two-jobs-test +++ b/regress/tests/two-jobs-test @@ -5,7 +5,7 @@ # 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 @@ -14,6 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting two-jobs-test ===" +echo " === Starting two-jobs-test ===" >>tmp/log echo " " bin/bacula start @@ -62,5 +63,5 @@ if [ $? != 0 ] ; then 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 diff --git a/regress/tests/two-vol-test b/regress/tests/two-vol-test index 2192c86dae..e79bbe3332 100755 --- a/regress/tests/two-vol-test +++ b/regress/tests/two-vol-test @@ -5,7 +5,7 @@ # 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 @@ -14,6 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting two-vol-test ===" +echo " === Starting two-vol-test ===" >tmp/log echo " " bin/bacula start @@ -55,5 +56,5 @@ if [ $? != 0 ] ; then 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 diff --git a/regress/tests/verify-vol-test b/regress/tests/verify-vol-test index 5cd7297956..59de6970ba 100755 --- a/regress/tests/verify-vol-test +++ b/regress/tests/verify-vol-test @@ -5,8 +5,8 @@ # 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 @@ -14,6 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting verify Volume Test ===" +echo " === Starting verify Volume Test ===" >>tmp/log echo " " bin/bacula start @@ -50,6 +51,5 @@ if [ $? != 0 ] ; then 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 -- 2.39.5