* Make "make install-strip" works properly, and "make install"
[rsync/rsync.git] / testsuite / rsync.fns
index 165dfa0..cf4037d 100644 (file)
@@ -24,6 +24,9 @@ TO=${TMP}/to
 LOG=${TMP}/log
 RSYNC="$rsync_bin"
 
+# Berkley's nice.
+PATH="$PATH:/usr/ucb"
+
 runtest() {
     echo $ECHO_N "Test $1: $ECHO_C"
     if eval "$2"
@@ -150,7 +153,11 @@ checkit() {
     echo "-------------"
     echo "check how the files compare with diff:"
     echo ""
-    diff -cr $2 $3 || failed=YES
+    for f in `cd "$2"; find . -type f -print `
+    do 
+        diff -c "$2"/"$f" "$3"/"$f" || failed=YES
+    done
+
     echo "-------------"
     echo "check how the directory listings compare with diff:"
     echo ""
@@ -197,10 +204,12 @@ use chroot = no
 hosts allow = localhost, 127.0.0.1
 log file = $logfile
 
-[test-from] = $scratchdir/daemon-from/
+[test-from]
+       path = $FROM
        read only = yes
 
-[test-to] = $scratchdir/daemon-to/
+[test-to]
+       path = $TO
        read only = no
 EOF
 }
@@ -222,6 +231,11 @@ test_fail() {
     exit 1
 }
 
+test_skipped() {
+    echo "$@" >&2
+    exit 77
+}
+
 # It failed, but we expected that.  don't dump out error logs, 
 # because most users won't want to see them.  But do leave
 # the working directory around.
@@ -230,5 +244,10 @@ test_xfail() {
     exit 78
 }
 
+# Test whether something is a link, allowing for shell peculiarities
+is_a_link() {
+    test -L "$1" || test -h "$1" || /usr/bin/test -L "$1" || /usr/bin/test -h "$1"
+}
+
 # be reproducible
 umask 077
\ No newline at end of file