]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/regexwhere-test
Update
[bacula/bacula] / regress / tests / regexwhere-test
index fa9f1ae375c5f21d348f46d822003d2bf878afed..692bd60b3670e68199d04904710fc808baf0a10e 100755 (executable)
@@ -7,16 +7,13 @@ TestName="regexwhere-test"
 JobName=backup
 
 . scripts/functions
-set_debug 0
-copy_test_confs
 
-rm -f bin/bacula-dir.conf
-rm -f tmp/RUN*
-rm -f ${cwd}/build/po/*old*
-rm -rf tmp/po
+scripts/cleanup
+scripts/copy-test-confs
+
 /bin/cp -f scripts/bacula-dir.conf.regexwhere bin/bacula-dir.conf
 
-echo "${cwd}/build/po" >/tmp/file-list
+echo "${cwd}/build/po" >tmp/file-list
 
 start_test
 
@@ -146,7 +143,7 @@ mod
 @## Where 
 m
 9
-/tmp/bacula-restore-it
+tmp/bacula-restore-it
 m
 @## use add suffix
 10
@@ -160,9 +157,8 @@ messages
 quit
 END_OF_DATA
 
+run_bacula
 
-bin/bacula start
-cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
 stop_bacula
 
 
@@ -186,7 +182,7 @@ fi
 J=JobB
 # $cwd begins with /
 if grep -q "Restore OK"  tmp/RUN_$J &&
-   grep -q "/tmp/bacula-restore${cwd}/po/fr.po.old" tmp/RUN_$J
+   grep -q "tmp/bacula-restore${cwd}/po/fr.po.old" tmp/RUN_$J
 then
     [ "$debug" = 1 ] && echo $J ok
 else
@@ -196,7 +192,7 @@ fi
 
 J=JobC
 if grep -q "Restore OK"  tmp/RUN_$J &&
-   grep -q "/tmp/bacula-restore${cwd}/build/po/fr.po" tmp/RUN_$J
+   grep -q "tmp/bacula-restore${cwd}/build/po/fr.po" tmp/RUN_$J
 then
     [ "$debug" = 1 ] && echo $J ok
 else
@@ -235,7 +231,7 @@ fi
 
 J=JobG
 if grep -q "Restore OK"  tmp/RUN_$J &&
-   grep -q "/tmp/bacula-restore/build/po/fr.po" tmp/RUN_$J
+   grep -q "tmp/bacula-restore/build/po/fr.po" tmp/RUN_$J
 then
     [ "$debug" = 1 ] && echo $J ok
 else
@@ -267,7 +263,7 @@ fi
 J=JobJ
 if grep -q "Restore OK"      tmp/RUN_$J &&
    grep -q "/etc/passwd.old" tmp/RUN_$J &&
-   grep -q -e "Where: */tmp/bacula-restore-it" tmp/RUN_$J &&
+   grep -q -e "Where: *tmp/bacula-restore-it" tmp/RUN_$J &&
    grep -q "${cwd}/build/po/fr.po.old" tmp/RUN_$J
 then
     [ "$debug" = 1 ] && echo $J ok
@@ -283,7 +279,7 @@ find ${cwd}/build > tmp/list
 sed -e 's/[Rr][Ee][Aa][Dd][Mm][Ee]/readme/' -e 's/\([ch]\)$/.old.\1/' tmp/list > tmp/list.sed
 ./build/src/tools/bregtest -s -f tmp/list -e '/readme/readme/i,/([ch])$/.old.$1/' > tmp/list.bsed
 
-if diff -q tmp/list.bsed tmp/list.sed
+if diff tmp/list.bsed tmp/list.sed >/dev/null 2>&1
 then
     [ "$debug" = 1 ] && echo bregtest ok
 else