From 06464f55e26e1f26e10c04f4a11a4d85fadbd5f7 Mon Sep 17 00:00:00 2001 From: Jos Backus Date: Tue, 24 Dec 2002 07:25:25 +0000 Subject: [PATCH] Change all relevant occurrences of ``rsync'' and ``$rsync_bin'' to the canonical form ``$RSYNC'' (set in testsuite/rsync.fns). This prevents any stray rsync binaries in the user's PATH from being picked up by the test scripts and ensures that the newly built rsync binary is used always. --- testsuite/00-hello.test | 2 +- testsuite/chown.test | 2 +- testsuite/daemon-gzip-download.test | 4 ++-- testsuite/daemon-gzip-upload.test | 4 ++-- testsuite/daemon.test | 4 ++-- testsuite/devices.test | 2 +- testsuite/duplicates.test | 2 +- testsuite/symlink-ignore.test | 2 +- testsuite/unsafe-links.test | 10 +++++----- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/testsuite/00-hello.test b/testsuite/00-hello.test index 2aacc288..d7774bb0 100644 --- a/testsuite/00-hello.test +++ b/testsuite/00-hello.test @@ -2,4 +2,4 @@ echo $0 running -"$rsync_bin" --version || exit 1 +$RSYNC --version || exit 1 diff --git a/testsuite/chown.test b/testsuite/chown.test index 9175bc33..2d58b902 100644 --- a/testsuite/chown.test +++ b/testsuite/chown.test @@ -31,7 +31,7 @@ chown 5001 "$name2" || test_skipped "Can't chown (probably need root)" chgrp 5002 "$name1" || test_skipped "Can't chgrp (probably need root)" chgrp 5003 "$name2" || test_skipped "Can't chgrp (probably need root)" -checkit "rsync -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" +checkit "$RSYNC -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" exit 0 # last [] may have failed but if we get here then we've won diff --git a/testsuite/daemon-gzip-download.test b/testsuite/daemon-gzip-download.test index bcb3ce1d..b716a992 100644 --- a/testsuite/daemon-gzip-download.test +++ b/testsuite/daemon-gzip-download.test @@ -23,9 +23,9 @@ build_rsyncd_conf -RSYNC_CONNECT_PROG="$rsync_bin --config=$conf --daemon" +RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon" export RSYNC_CONNECT_PROG hands_setup -checkit "$rsync_bin -avvz localhost::test-from/ \"$TO/\"" "$FROM" "$TO" +checkit "$RSYNC -avvz localhost::test-from/ \"$TO/\"" "$FROM" "$TO" diff --git a/testsuite/daemon-gzip-upload.test b/testsuite/daemon-gzip-upload.test index 8a3f33f4..04642ac8 100644 --- a/testsuite/daemon-gzip-upload.test +++ b/testsuite/daemon-gzip-upload.test @@ -17,9 +17,9 @@ build_rsyncd_conf -RSYNC_CONNECT_PROG="$rsync_bin --config=$conf --daemon" +RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon" export RSYNC_CONNECT_PROG hands_setup -checkit "$rsync_bin -avvz \"$FROM/\" localhost::test-to/" "$FROM" "$TO" +checkit "$RSYNC -avvz \"$FROM/\" localhost::test-to/" "$FROM" "$TO" diff --git a/testsuite/daemon.test b/testsuite/daemon.test index 87ebc099..54865053 100644 --- a/testsuite/daemon.test +++ b/testsuite/daemon.test @@ -26,7 +26,7 @@ build_rsyncd_conf -RSYNC_CONNECT_PROG="$rsync_bin --config=$conf --daemon" +RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon" export RSYNC_CONNECT_PROG -$rsync_bin -v localhost:: +$RSYNC -v localhost:: diff --git a/testsuite/devices.test b/testsuite/devices.test index a831e47b..21ad10ab 100644 --- a/testsuite/devices.test +++ b/testsuite/devices.test @@ -22,7 +22,7 @@ mkdir "$fromdir" mknod "$fromdir/char" c 42 69 || test_skipped "Can't create char device node unless root" mknod "$fromdir/block" b 42 69 || test_skipped "Can't create block device node unless root" -checkit "rsync -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" +checkit "$RSYNC -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" exit 0 # last [] may have failed but if we get here then we've won diff --git a/testsuite/duplicates.test b/testsuite/duplicates.test index f391d1b9..9e47c70a 100644 --- a/testsuite/duplicates.test +++ b/testsuite/duplicates.test @@ -38,7 +38,7 @@ ln -s "$name1" "$name2" || fail "can't create symlink" outfile="$scratchdir/rsync.out" -checkit "rsync -avv \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" \ +checkit "$RSYNC -avv \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" \ | tee "$outfile" # Make sure each file was only copied once... diff --git a/testsuite/symlink-ignore.test b/testsuite/symlink-ignore.test index 9c44871d..486ca804 100644 --- a/testsuite/symlink-ignore.test +++ b/testsuite/symlink-ignore.test @@ -16,7 +16,7 @@ build_symlinks || test_fail "failed to build symlinks" # Copy recursively, but without -l or -L or -a, and all the symlinks # should be missing. -"$rsync_bin" -r "$fromdir/" "$todir" || test_fail "rsync returned $?" +$RSYNC -r "$fromdir/" "$todir" || test_fail "$RSYNC returned $?" [ -f "${todir}/referent" ] || test_fail "referent was not copied" [ -d "${todir}/from" ] && test_fail "extra level of directories" diff --git a/testsuite/unsafe-links.test b/testsuite/unsafe-links.test index ea17d5b6..7b508bcb 100644 --- a/testsuite/unsafe-links.test +++ b/testsuite/unsafe-links.test @@ -35,20 +35,20 @@ ln -s ../../unsafe/unsafefile "from/safe/links/" set -x echo "rsync with relative path and just -a"; -rsync -avv from/safe/ to +$RSYNC -avv from/safe/ to test_symlink to/links/file1 test_symlink to/links/file2 test_symlink to/links/unsafefile echo "rsync with relative path and -a --copy-links" -rsync -avv --copy-links from/safe/ to +$RSYNC -avv --copy-links from/safe/ to test_regular to/links/file1 test_regular to/links/file2 test_regular to/links/unsafefile #next rsync copy correctly echo "rsync with relative path and --copy-unsafe-links"; -rsync -avv --copy-unsafe-links from/safe/ to +$RSYNC -avv --copy-unsafe-links from/safe/ to test_symlink to/links/file1 test_symlink to/links/file2 test_regular to/links/unsafefile @@ -61,7 +61,7 @@ test_skipped "correct behaviour is unclear" rm -rf to #next rsync copy incorrectly - links are copied as files not as links echo "rsync with relative2 path"; -(cd from; rsync -avv --copy-unsafe-links safe/ ../to) +(cd from; $RSYNC -avv --copy-unsafe-links safe/ ../to) test_symlink to/links/file1 test_symlink to/links/file2 test_regular to/links/unsafefile @@ -69,7 +69,7 @@ test_regular to/links/unsafefile rm -rf to #next rsync copy uncorectly - all links are copied echo "rsync with absolute path"; -rsync -avv --copy-unsafe-links `pwd`/from/safe/ to +$RSYNC -avv --copy-unsafe-links `pwd`/from/safe/ to test_symlink to/links/file1 test_symlink to/links/file2 test_regular to/links/unsafefile -- 2.34.1