X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/d58e4c273c6a8d770c4e0cd80d5f1b70270eb229..f494f2864cc392ed9fb5cdb448f67135b040d1a8:/testsuite/rsync.fns diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 1e9e8193..ddeafb17 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -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" @@ -134,6 +137,11 @@ makepath () { # Run a test (in '$1') then compare directories $2 and $3 to see if # there are any difference. If there are, explain them. +# So normally basically $1 should be an rsync command, and $2 and $3 +# the source and destination directories. This is only good when you +# expect to transfer the whole directory exactly as is. If some files +# should be excluded, you might need to use something else. + checkit() { failed= @@ -152,7 +160,7 @@ checkit() { echo "" for f in `cd "$2"; find . -type f -print ` do - diff -u "$2"/"$f" "$3"/"$f" || failed=YES + diff -c "$2"/"$f" "$3"/"$f" || failed=YES done echo "-------------" @@ -201,10 +209,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 } @@ -239,5 +249,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