Proper messages for skipped tests.
[rsync/rsync.git] / testsuite / ssh-basic.test
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 if [ "x$rsync_enable_ssh_tests" != xyes ]
14 then
15     test_skipped "Skipping SSH tests because \$rsync_enable_ssh_tests is not set"
16 fi
17
18 if ! type ssh >/dev/null ; then
19     test_skipped "Skipping SSH tests because ssh is not in the path"
20 fi
21
22 if ! [ "`ssh -o'BatchMode yes' localhost echo yes`" = "yes" ]; then
23     test_skipped "Skipping SSH tests because ssh conection to localhost not authorised"
24 fi
25
26 runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
27
28 mv ${TO}/${F1} ${TO}/ThisShouldGo
29
30 runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'