]> git.sur5r.net Git - bacula/bacula/commitdiff
Make strip-test work better
authorKern Sibbald <kern@sibbald.com>
Tue, 29 Jul 2008 19:40:05 +0000 (19:40 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 29 Jul 2008 19:40:05 +0000 (19:40 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7448 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/bacula-dir-strip.conf.in
regress/tests/strip-test

index fc1588218debf9d19ab120a934f46a18479c0f59..c490892ae151876f16c6d8c74fd14223de3fd7fc 100644 (file)
@@ -104,13 +104,13 @@ Job {
 FileSet {
   Name = "Full Set"
   Include { Options { 
-      strippath = 1
+      strippath = 3
       compression = gzip
     }
     File =  <@tmpdir@/file-list
   }
   Include {
-     File = /etc
+#    File = /usr/include
   }
 }
 
index 6b86ce4ac90edba4187a36512ee82724c4ef717b..e129fad8f94b37a12ddac814eb47a266dd5f9799 100755 (executable)
@@ -10,7 +10,10 @@ scripts/cleanup
 scripts/copy-strip-confs
 
 
-echo "${cwd}/build/src/dird" >${cwd}/tmp/file-list
+rm -rf /tmp/$$-strip
+mkdir /tmp/$$-strip
+cp -rpf ${cwd}/build/src/dird/ /tmp/$$-strip/
+echo "/tmp/$$-strip" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
 start_test
@@ -54,6 +57,17 @@ check_for_zombie_jobs storage=FileStorage
 stop_bacula
 
 check_two_logs
-# check_restore_diff does not work because we cannot read all /etc, so skip it
-dstat=0
+#
+# Kludge remove this next line when strip is fixed
+#
+rm -rf tmp/bacula-restores/tmp
+if test "$debug" -eq 1 ; then
+   diff -ur /tmp/$$-strip/dird/ tmp/bacula-restores/
+else 
+   diff -r /tmp/$$-strip/dird/ tmp/bacula-restores/ 2>&1 >/dev/null
+fi
+dstat=$?
+
+rm -rf /tmp/$$-strip
+
 end_test