1: #!/bin/sh
2:
3: # Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
4: # Copyright (C) 2001 by Martin Pool <mbp@samba.org>
5:
6: # This program is distributable under the terms of the GNU GPL (see
7: # COPYING)
8:
9: # This script tests ssh, if possible. It's called by runtests.sh
10:
11: . "$suitedir/rsync.fns"
12:
13: SSH="$scratchdir/src/support/lsh.sh"
14:
15: if test x"$rsync_enable_ssh_tests" = xyes; then
16: if type ssh >/dev/null ; then
17: SSH=ssh
18: fi
19: fi
20:
21: if [ "`$SSH -o'BatchMode yes' localhost echo yes`" != "yes" ]; then
22: test_skipped "Skipping SSH tests because ssh connection to localhost not authorised"
23: fi
24:
25: echo "Using remote shell: $SSH"
26:
27: # Create some files for rsync to copy
28: hands_setup
29:
30: runtest "ssh: basic test" 'checkit "$RSYNC -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'
31:
32: mv "$todir/text" "$todir/ThisShouldGo"
33:
34: runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>