]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/weird-files-test
regress: add function to create many dirs
[bacula/bacula] / regress / tests / weird-files-test
index fea5007f401ef1a0bd7689150e1cd76fc69ec5ee..2292a3ac7d40fdc43596ee88f5c5dcb7ebdac4a2 100755 (executable)
@@ -6,7 +6,6 @@
 TestName="weird-files-test"
 JobName=wierd-files
 . scripts/functions
-set_debug 0
 
 if test ! -d weird-files ; then
    echo " "
@@ -24,8 +23,8 @@ change_jobname NightlySave $JobName
 #  that are only saved once.  In 1.33, Bacula now deals
 #  with this situation.
 #
-echo "${cwd}/weird-files" >/tmp/file-list
-echo "${cwd}/weird-files" >>/tmp/file-list
+echo "${cwd}/weird-files" >${cwd}/tmp/file-list
+echo "${cwd}/weird-files" >>${cwd}/tmp/file-list
 
 # Create a Unix domain socket (sock-file)
 cd weird-files
@@ -55,7 +54,6 @@ done
 yes
 wait
 messages
-@$out
 quit
 END_OF_DATA
 
@@ -73,8 +71,21 @@ ${cwd}/bin/testls weird-files | sort >${cwd}/tmp/restored
 cd ${cwd}
 
 check_two_logs
-#diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
-diff ${cwd}/tmp/original ${cwd}/tmp/restored                
-dstat=$?
+if test "$debug" -eq 1; then
+  diff -u ${cwd}/tmp/original ${cwd}/tmp/restored
+  dstat=$?
+  if [ $dstat != 0 ] ; then
+     echo " "
+     echo "===== Original ======"
+     cat ${cwd}/tmp/original
+     echo "====="
+     echo " "
+     echo "===== Restored ======"
+     cat ${cwd}/tmp/restored
+     echo "====="
+  fi
+else
+  diff -u ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
+  dstat=$?
+fi
 end_test