]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport regress/tests/accurate-test
authorKern Sibbald <kern@sibbald.com>
Wed, 2 Sep 2020 12:42:26 +0000 (14:42 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 1 Mar 2022 14:36:17 +0000 (15:36 +0100)
This commit is the result of the squash of the following main commits:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Jul 16 10:37:54 2016 +0200

    regress: use correct variable to execute scripts

regress/tests/accurate-test

index 7b27e224c9a3935a7dba388cfc82bd6cba528a87..0fca25e32d68f532171a2568b963ee951c2abbf1 100755 (executable)
@@ -2,8 +2,6 @@
 #
 # Copyright (C) 2000-2020 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
-#
-
 #
 # TODO:
 #  - test bextract
@@ -172,6 +170,17 @@ rm -rf ${cwd}/tmp/bacula-restores
 p Check with bls
 ################################################################
 
+#
+# When FORCE_DEDUP is set, bls cannot work when the SD is running so skip this test
+if test x$FORCE_DEDUP != xyes; then
+   $bin/bls -c $conf/bacula-sd.conf -V 'TestVolume001' FileStorage > $tmp/bls.out
+   grep -- '----' $tmp/bls.out | grep xxx > /dev/null
+   if [ $? != 0 ] ; then
+      print_debug "ERROR: Could not find deleted files in $tmp/bls.out"
+      cat $tmp/bls.out
+      bstat=2
+   fi
+fi
 
 ################################################################
 p Now do a backup after making few changes
@@ -281,11 +290,11 @@ stop_bacula
 p Check with bscan -- this takes some time
 ################################################################
 
-cd $bin
+cd $cwd/bin
   ./drop_bacula_tables      >/dev/null 2>&1
   ./make_bacula_tables      >/dev/null 2>&1
   ./grant_bacula_privileges >/dev/null 2>&1
-cd ..
+cd $cwd
 
 echo "volume=TestVolume001" >tmp/bscan.bsr