Cleanup check_logs feature.
authorMartin Pool <mbp@samba.org>
Wed, 29 Aug 2001 09:18:45 +0000 (09:18 +0000)
committerMartin Pool <mbp@samba.org>
Wed, 29 Aug 2001 09:18:45 +0000 (09:18 +0000)
`ps ax' is not portable -- don't use it to generate random text.  Use
`ls -lR' instead.

testsuite/hands.test
testsuite/rsync.fns

index b9c68c4..aeb208d 100644 (file)
@@ -1,38 +1,19 @@
 #!/bin/sh
 
 # Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
 #!/bin/sh
 
 # Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
+# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
 #
 # This program is distributable under the terms of the GNU GPL (see COPYING)
 #
 # This program is distributable under the terms of the GNU GPL (see COPYING)
-#
-# This is a simple test script that tests a few rsync
-# features to make sure I haven't broken them before a release.
-#
-#
 
 . "$suitedir/rsync.fns"
 
 hands_setup
 
 
 . "$suitedir/rsync.fns"
 
 hands_setup
 
-
-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
-  else
-    echo ""
-    echo "Tests Completed Successfully :-)"
-  fi
-}
-
 # Main script starts here
 
 runtest "basic operation" 'checkit "$RSYNC -av ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 # Main script starts here
 
 runtest "basic operation" 'checkit "$RSYNC -av ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
-ln ${FROM}/pslist ${FROM}/dir
+ln ${FROM}/filelist ${FROM}/dir
 runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 rm ${TO}/${F1}
 runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 rm ${TO}/${F1}
index 3cbb768..85e1fbe 100644 (file)
@@ -27,7 +27,9 @@ hands_setup() {
     # set up test data
     touch ${FROM}/empty
     mkdir ${FROM}/emptydir
     # 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
 
     # This might fail on systems that don't have -n
     echo $ECHO_N "This file has no trailing lf$ECHO_C" > ${FROM}/nolf