From 063d5f96ae25205045e17efff9c8bb0b74dff4c5 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 19 Jun 2008 10:47:28 +0000 Subject: [PATCH] Nothing git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7170 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/CTestCustom.cmake | 3 ++ regress/experimental-all | 2 +- regress/experimental-disk | 2 +- regress/experimental-disk-and-tape | 2 +- regress/experimental-tape | 2 +- regress/nightly-all | 2 +- regress/nightly-disk | 2 +- regress/nightly-disk-and-tape | 2 +- regress/nightly-tape | 2 +- regress/scripts/functions | 2 ++ regress/scripts/pretest | 45 ++++++++++++++++++++++++++++++ regress/scripts/regress-config | 29 ------------------- 12 files changed, 58 insertions(+), 37 deletions(-) create mode 100755 regress/scripts/pretest diff --git a/regress/CTestCustom.cmake b/regress/CTestCustom.cmake index f5bdb266f8..c1cb28bf92 100644 --- a/regress/CTestCustom.cmake +++ b/regress/CTestCustom.cmake @@ -1,3 +1,4 @@ + SET(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION} "ERROR: *database \".*\" already exists" @@ -10,3 +11,5 @@ SET(CTEST_CUSTOM_ERROR_EXCEPTION SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 10000) SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1048576) SET (CTEST_NIGHTLY_START_TIME "23:00:00 CET") + +SET(CTEST_CUSTOM_PRE_TEST scripts/pretest) diff --git a/regress/experimental-all b/regress/experimental-all index c23d1305da..32c8a60771 100755 --- a/regress/experimental-all +++ b/regress/experimental-all @@ -15,7 +15,7 @@ nice ctest -D Experimental -R "^(disk|tape|changer):" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ]; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/experimental-disk b/regress/experimental-disk index 93459f2f07..253eb11cef 100755 --- a/regress/experimental-disk +++ b/regress/experimental-disk @@ -15,7 +15,7 @@ nice ctest -D Experimental -R "^disk:" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ]; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/experimental-disk-and-tape b/regress/experimental-disk-and-tape index 473aa2c5df..f83880ef30 100755 --- a/regress/experimental-disk-and-tape +++ b/regress/experimental-disk-and-tape @@ -15,7 +15,7 @@ nice ctest -D Experimental -R "^(disk|tape):" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ] ; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/experimental-tape b/regress/experimental-tape index bb38bb0ce5..1addaca685 100755 --- a/regress/experimental-tape +++ b/regress/experimental-tape @@ -15,7 +15,7 @@ nice ctest -D Experimental -R "^tape:" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ] ; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/nightly-all b/regress/nightly-all index c5049808b6..4bca6e1e54 100755 --- a/regress/nightly-all +++ b/regress/nightly-all @@ -15,7 +15,7 @@ nice ctest -D Nightly -R "^(disk|tape|changer):" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ] ; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/nightly-disk b/regress/nightly-disk index 43833cc696..8101355d58 100755 --- a/regress/nightly-disk +++ b/regress/nightly-disk @@ -15,7 +15,7 @@ nice ctest -D Nightly -R "^disk:" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ]; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/nightly-disk-and-tape b/regress/nightly-disk-and-tape index 5493b8d1ac..edd9cbff0e 100755 --- a/regress/nightly-disk-and-tape +++ b/regress/nightly-disk-and-tape @@ -15,7 +15,7 @@ nice ctest -D Experimental -R "^(disk|tape):" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ] ; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/nightly-tape b/regress/nightly-tape index 6eb0c05f0c..1c5a85ea89 100755 --- a/regress/nightly-tape +++ b/regress/nightly-tape @@ -15,7 +15,7 @@ nice ctest -D Nightly -R "^tape:" rtn=$? i=0 while [ $i -le 5 ]; do - if [ $rtn = 0 ] ; then + if [ $rtn = 0 ] || [ "$rtn" = "8" ]; then break; fi echo "Submit failed, waiting 5 mins" diff --git a/regress/scripts/functions b/regress/scripts/functions index c2658e0946..6aad47dca1 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -107,9 +107,11 @@ run_bacula() bin/bacula-ctl-fd start bin/bacula-ctl-dir start cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf + return $? else bin/bacula start 2>&1 >/dev/null cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null + return $? fi } diff --git a/regress/scripts/pretest b/regress/scripts/pretest new file mode 100755 index 0000000000..39f58d8e9f --- /dev/null +++ b/regress/scripts/pretest @@ -0,0 +1,45 @@ +#!/bin/sh +# +# Test if daemons start +# + +TestName="pretest" +JobName=backup +error=0 + +. scripts/functions + +copy_test_confs + + +cat <${cwd}/tmp/bconcmds +messages +quit +END_OF_DATA + +start_test + +if ! run_bacula +then + echo "error: bconsole error" + error=1 +fi + +for i in bacula-fd bacula-sd bacula-dir +do + if ! ps -C $i >/dev/null + then + echo "error: $i not running" + error=1 + fi +done + +stop_bacula + +export dstat=0 +export bstat=$error +export rstat=0 + +end_test + +exit $error diff --git a/regress/scripts/regress-config b/regress/scripts/regress-config index b6cb8bd2bf..5b589bd68f 100755 --- a/regress/scripts/regress-config +++ b/regress/scripts/regress-config @@ -27,32 +27,3 @@ CFLAGS="-g -O2 -Wall" \ --with-baseport=${BASEPORT} exit 0 -#!/bin/sh -# -# This is the configuration script for regression testing -# - -. ${1}/config - -CFLAGS="-g -O2 -Wall" \ - ./configure \ - --sbindir=${1}/bin \ - --sysconfdir=${1}/bin \ - --mandir=${1}/bin \ - --with-pid-dir=${1}/working \ - --with-subsys-dir=${1}/working \ - --enable-smartalloc \ - --disable-readline \ - --with-working-dir=${1}/working \ - --with-archivedir=${1}/tmp \ - --with-dump-email=${EMAIL} \ - --with-job-email=${EMAIL} \ - --with-smtp-host=${SMTP_HOST} \ - --with-db-name=regress \ - --with-db-user=regress \ - ${OPENSSL} \ - ${TCPWRAPPERS} \ - ${WHICHDB} \ - --with-baseport=${BASEPORT} - -exit 0 -- 2.39.5