Allow $RSYNC_TEST_TMP to indicate a good tmp dir for our tests.
[rsync/rsync.git] / testsuite / ssh-basic.test
CommitLineData
3fedd74b
MP
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
e717fa4d 13SSH="$scratchdir/src/support/lsh"
b58e4033
WD
14
15if test x"$rsync_enable_ssh_tests" = xyes; then
16 if type ssh >/dev/null ; then
17 SSH=ssh
18 fi
55bdb416
MP
19fi
20
17a16769 21if [ "`$SSH -o'BatchMode yes' localhost echo yes`" != "yes" ]; then
79c9d8a1 22 test_skipped "Skipping SSH tests because ssh conection to localhost not authorised"
3fedd74b
MP
23fi
24
b58e4033 25echo "Using remote shell: $SSH"
5702bc12 26
b58e4033
WD
27# Create some files for rsync to copy
28hands_setup
3fedd74b 29
b58e4033 30runtest "ssh: basic test" 'checkit "$RSYNC -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'
5702bc12 31
b58e4033 32mv "$todir/text" "$todir/ThisShouldGo"
3fedd74b 33
b58e4033 34runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'