From dc3bb86c7a52ea1e1257a7e2cceb98513523e539 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 19 Jun 2010 15:58:28 +0200 Subject: [PATCH] Save any dumps during regression to dumps directory --- regress/Makefile | 6 +++--- regress/all-changer-tests | 1 + regress/all-dev-tests | 1 + regress/all-disk-tests | 1 + regress/all-root-tests | 1 + regress/all-tape-and-disk-tests | 1 + regress/all-tape-tests | 1 + regress/all-tests | 1 + regress/experimental-all | 1 + regress/experimental-disk | 1 + regress/experimental-disk-and-tape | 1 + regress/experimental-tape | 1 + regress/nightly-all | 1 + regress/nightly-disk | 1 + regress/nightly-disk-and-tape | 1 + regress/nightly-tape | 1 + regress/scripts/functions | 4 ++++ 17 files changed, 22 insertions(+), 3 deletions(-) diff --git a/regress/Makefile b/regress/Makefile index 983b0147d2..716893ffea 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -26,8 +26,8 @@ bacula: all @-gunzip w.tar.gz @-tar xf w.tar @rm -f w.tar.gz w.tar - @rm -rf tmp working - mkdir tmp working + @rm -rf tmp working dumps + mkdir tmp working dumps echo "Doing: scripts/setup" scripts/setup @@ -50,7 +50,7 @@ root_test: clean: scripts/cleanup rm -f tmp/file-list - rm -fr tmp/* working/* Testing + rm -fr tmp/* working/* dumps/* Testing rm -f test.out rm -f diff rm -f 1 2 3 scripts/1 scripts/2 scripts/3 tests/1 tests/2 tests/3 diff --git a/regress/all-changer-tests b/regress/all-changer-tests index 88c0a7b9af..65dc26e4db 100755 --- a/regress/all-changer-tests +++ b/regress/all-changer-tests @@ -4,6 +4,7 @@ # echo "Start autochanger tests" echo "Start autochanger tests" >>test.out +rm -f dumps/* nice tests/incremental-changer nice tests/two-pool-changer diff --git a/regress/all-dev-tests b/regress/all-dev-tests index 34f0ba2c59..cdf776ea1d 100755 --- a/regress/all-dev-tests +++ b/regress/all-dev-tests @@ -7,6 +7,7 @@ echo " " echo " " >>test.out echo "Start sample non-root disk tests" echo "Start sample non-root disk tests" >>test.out +rm -f dumps/* nice tests/acl-xattr-test nice tests/action-on-purge-test nice tests/allowcompress-test diff --git a/regress/all-disk-tests b/regress/all-disk-tests index ed399d5d2c..46fd443428 100755 --- a/regress/all-disk-tests +++ b/regress/all-disk-tests @@ -6,6 +6,7 @@ echo " " echo " " >>test.out echo "Start non-root disk tests" echo "Start non-root disk tests" >>test.out +rm -f dumps/* nice tests/acl-xattr-test nice tests/action-on-purge-test nice tests/allowcompress-test diff --git a/regress/all-root-tests b/regress/all-root-tests index 1ba54d9f4a..284f4e4703 100755 --- a/regress/all-root-tests +++ b/regress/all-root-tests @@ -6,6 +6,7 @@ echo " " echo " " >>test.out echo "Start root tests" echo "Start root tests" >>test.out +rm -f dumps/* tests/dev-test-root tests/etc-test-root tests/lib-test-root diff --git a/regress/all-tape-and-disk-tests b/regress/all-tape-and-disk-tests index 9bc3e7676c..3d0e99d8b4 100755 --- a/regress/all-tape-and-disk-tests +++ b/regress/all-tape-and-disk-tests @@ -2,5 +2,6 @@ # # Run all tests # +rm -f dumps/* ./all-non-root-tests ./all-non-root-tape-tests diff --git a/regress/all-tape-tests b/regress/all-tape-tests index aee2a5248f..a99ad92348 100755 --- a/regress/all-tape-tests +++ b/regress/all-tape-tests @@ -16,6 +16,7 @@ echo " " echo " " >>test.out echo "Start all non-root tape tests" echo "Start all non-root tape tests" >>test.out +rm -f dumps/* nice tests/ansi-label-tape nice tests/backup-bacula-tape nice tests/bscan-tape diff --git a/regress/all-tests b/regress/all-tests index e3dc688c87..d54eb22489 100755 --- a/regress/all-tests +++ b/regress/all-tests @@ -2,5 +2,6 @@ # # Run all tests # +rm -f dumps/* ./all-non-root-tests ./all-root-tests diff --git a/regress/experimental-all b/regress/experimental-all index df73917bf4..bf4a41dbc3 100755 --- a/regress/experimental-all +++ b/regress/experimental-all @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull scripts/config_dart nice ctest -D Experimental -R "^(disk|tape|changer):" diff --git a/regress/experimental-disk b/regress/experimental-disk index a965df9242..39476df9de 100755 --- a/regress/experimental-disk +++ b/regress/experimental-disk @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull scripts/config_dart make setup diff --git a/regress/experimental-disk-and-tape b/regress/experimental-disk-and-tape index 442370ded8..b1bd2a0f77 100755 --- a/regress/experimental-disk-and-tape +++ b/regress/experimental-disk-and-tape @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull scripts/config_dart nice ctest -D Experimental -R "^(disk|tape):" diff --git a/regress/experimental-tape b/regress/experimental-tape index fecd7d86de..c12edf4d7e 100755 --- a/regress/experimental-tape +++ b/regress/experimental-tape @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull scripts/config_dart nice ctest -D Experimental -R "^tape:" diff --git a/regress/nightly-all b/regress/nightly-all index 7f817952a8..28651ec3e5 100755 --- a/regress/nightly-all +++ b/regress/nightly-all @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull make distclean scripts/config_dart diff --git a/regress/nightly-disk b/regress/nightly-disk index d97b69fa93..85c59c5c7b 100755 --- a/regress/nightly-disk +++ b/regress/nightly-disk @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git checkout master git pull # diff --git a/regress/nightly-disk-and-tape b/regress/nightly-disk-and-tape index f32bea5217..9a96c6185a 100755 --- a/regress/nightly-disk-and-tape +++ b/regress/nightly-disk-and-tape @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull make distclean scripts/config_dart diff --git a/regress/nightly-tape b/regress/nightly-tape index e4d3517181..d8a1890a2e 100755 --- a/regress/nightly-tape +++ b/regress/nightly-tape @@ -9,6 +9,7 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull make distclean scripts/config_dart diff --git a/regress/scripts/functions b/regress/scripts/functions index de33c0a89b..97402695fc 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -318,7 +318,9 @@ end_test() { if [ x$notracedump != xyes ]; then cat ${working}/bacula.*.traceback 2>/dev/null + cp -f ${working}/bacula.*.traceback ${dumps} 2>/dev/null cat ${working}/*.bactrace 2>/dev/null + cp -f ${working}/*.bactrace ${dumps} 2>/dev/null fi if [ $estat != 0 ] ; then echo " " @@ -492,6 +494,7 @@ db_name=${db_name:-"regress"} db_user=${db_user:-"regress"} db_password=${db_password:-""} working=${working:-"$cwd/working"} +dumps=${dumps:-"$cwd/dumps"} bin=${bin:-"$cwd/bin"} # Bacula scripts @@ -515,6 +518,7 @@ tmpsrc=${tmpsrc:-"$cwd/tmp/build"} export bin export conf export working +export dumps export scripts export rscripts export tmp -- 2.39.5