]> git.sur5r.net Git - bacula/bacula/commitdiff
regress: replace testls by diff.pl in weird-files-test
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 23 Jun 2010 12:50:47 +0000 (14:50 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:53:56 +0000 (16:53 +0200)
regress/tests/weird-files-test

index 2292a3ac7d40fdc43596ee88f5c5dcb7ebdac4a2..4bc02c675b3bff2256a0f86808125f6e030a6032 100755 (executable)
@@ -60,32 +60,20 @@ END_OF_DATA
 run_bacula
 check_for_zombie_jobs storage=File 
 stop_bacula
+
 # Note, the Unix domain socket (sock-file) is not restored
-#  by Bacula so we delete it for the diffs
-rm -f weird-files/sock-file
-touch weird-files tmp/bacula-restores${cwd}/weird-files
+#  by Bacula so we delete it for the diffs. diff.pl already discards them
+# rm -f weird-files/sock-file
+
+# to have the same mtime after the rm, we need to touch directories
+# touch weird-files tmp/bacula-restores${cwd}/weird-files
+
 
-${cwd}/bin/testls weird-files | sort >${cwd}/tmp/original
-cd tmp/bacula-restores${cwd}
-${cwd}/bin/testls weird-files | sort >${cwd}/tmp/restored
-cd ${cwd}
+$rscripts/diff.pl -s weird-files -d tmp/bacula-restores${cwd}/weird-files > tmp/diff.out
+dstat=$?
 
 check_two_logs
 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=$?
+  cat tmp/diff.out
 fi
 end_test