Cleanup check_logs feature.
[rsync/rsync.git] / testsuite / rsync.fns
index 8729a4a..85e1fbe 100644 (file)
@@ -27,7 +27,9 @@ hands_setup() {
     # set up test data
     touch ${FROM}/empty
     mkdir ${FROM}/emptydir
-    ps ax > ${FROM}/pslist
+
+    # a few hundred lines of test
+    ls -lR / | head -200 > ${FROM}/filelist
 
     # This might fail on systems that don't have -n
     echo $ECHO_N "This file has no trailing lf$ECHO_C" > ${FROM}/nolf
@@ -83,3 +85,18 @@ checkit() {
     fi
 }
 
+
+# In fact, we need a more general feature of capturing all stderr/log files,
+# and dumping them if something goes wrong.
+
+checkforlogs() {
+  # skip it if we're under debian-test
+  if test -n "${Debian}" ; then return 0 ; fi
+
+  if [ -f $1 -a -s $1 ] ; then
+       echo "Failures have occurred.  $1 follows:" >&2
+       cat $1 >&2
+       exit 1
+  fi
+}
+