From: Kern Sibbald Date: Sat, 19 Jun 2010 13:58:28 +0000 (+0200) Subject: Save any dumps during regression to dumps directory X-Git-Tag: Release-5.0.3~148 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=893adbd996f222742bf9ead5affc6578768bebd6;p=bacula%2Fbacula Save any dumps during regression to dumps directory --- 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 e7888bce94..7cded2fe7f 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 edd7f0ae50..468466ab25 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 6f199012a7..d4f8045de2 100755 --- a/regress/nightly-disk +++ b/regress/nightly-disk @@ -9,15 +9,16 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG rm -rf Testing +rm -f dumps/* git pull # # Temp switch to branch Branch-5.0 NB this leaves you on a headless # branch, but it works for building and testing. # -git checkout `git branch -r | grep "5\.0" | head -1` -if [ $? -ne 0 ]; then - git checkout master -fi +#git checkout `git branch -r | grep "5\.0" | head -1` +#if [ $? -ne 0 ]; then +# git checkout master +#fi make distclean scripts/config_dart make setup 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 aaaac42d87..6e9e751b59 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -320,9 +320,15 @@ check_restore_tmp_build_diff() # end_test() { - cat ${working}/bacula.*.traceback 2>/dev/null - cat ${working}/*.bactrace 2>/dev/null - echo -e $print_error + 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 [ -f $tmp/err.log ]; then + cat $tmp/err.log + fi if [ $estat != 0 ] ; then echo " " echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! " @@ -495,6 +501,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 @@ -518,6 +525,7 @@ tmpsrc=${tmpsrc:-"$cwd/tmp/build"} export bin export conf export working +export dumps export scripts export rscripts export tmp