summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-03-04 21:46:00 -0800
committerWayne Davison <wayned@samba.org>2008-03-04 21:46:27 -0800
commit89b47d43debdd4e6986dca9626de1dd4a1bebf82 (patch)
tree806aa211c81a6099b223bd4ad21d7999abbdeb10 /testsuite
parentd1c06c2180f337deaa059fc408fcca4f4770a585 (diff)
downloadrsync-89b47d43debdd4e6986dca9626de1dd4a1bebf82.tar.gz
- Made the itemize test check for CAN_HARDLINK_SYMLINK define instead
of running its own test using ln. - Made the merge test call checkit with absolute paths so that some folk's cd command won't foul things up with extra output.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/itemize.test9
-rw-r--r--testsuite/merge.test2
2 files changed, 5 insertions, 6 deletions
diff --git a/testsuite/itemize.test b/testsuite/itemize.test
index 80b50050..15fd6737 100644
--- a/testsuite/itemize.test
+++ b/testsuite/itemize.test
@@ -25,16 +25,15 @@ umask 0
ln -s ../bar/baz/rsync "$fromdir/foo/sym"
umask 022
ln "$fromdir/foo/config1" "$fromdir/foo/extra"
+rm -f "$to2dir"
-# Check if the OS can hard-link symlinks or not.
-# (Note: the link we check MUST NOT point to a valid file!)
-ln -s no-such-dir "$to2dir"
-if ln "$to2dir" "$to2dir.test" 2>/dev/null; then
+# Check if rsync is set to hard-link symlinks.
+confile=`echo "$scratchdir" | sed 's;/testtmp/itemize$;/config.h;'`
+if egrep '^#define CAN_HARDLINK_SYMLINK 1' "$confile" >/dev/null; then
L=hL
else
L=cL
fi
-rm -f "$to2dir" "$to2dir.test"
# Check if rsync can preserve time on symlinks
case "$RSYNC" in
diff --git a/testsuite/merge.test b/testsuite/merge.test
index cc979bc4..1720a181 100644
--- a/testsuite/merge.test
+++ b/testsuite/merge.test
@@ -51,7 +51,7 @@ $RSYNC -av --existing -f 'exclude,! */' from2/ from3/
$RSYNC -av --existing -f 'exclude,! */' from1/ chk/
$RSYNC -av --existing -f 'exclude,! */' from3/ chk/
-checkit "$RSYNC -avv deep/arg-test shallow from1/ from2/ from3/ to/" chk to
+checkit "$RSYNC -avv deep/arg-test shallow from1/ from2/ from3/ to/" "$chkdir" "$todir"
# The script would have aborted on error, so getting here means we've won.
exit 0