Tweaked some whitespace to match the latest version from autoconf.
[rsync/rsync.git] / testsuite / batch-mode.test
CommitLineData
341c9a13
WD
1#! /bin/sh
2
3# Copyright (C) 2004 by Chris Shoemaker <c.shoemaker@cox.net>
4
5# This program is distributable under the terms of the GNU GPL (see
6# COPYING).
7
8# Test rsync's --write-batch and --read-batch options
9
10. "$suitedir/rsync.fns"
11
341c9a13
WD
12hands_setup
13
14cd "$tmpdir"
15
16# Build chkdir for the daemon tests using a normal rsync and an --exclude.
17$RSYNC -av --exclude=foobar.baz "$fromdir/" "$chkdir/"
18
19runtest "local --write-batch" 'checkit "$RSYNC -av --write-batch=BATCH \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
20
21rm -rf "$todir"
22runtest "--read-batch" 'checkit "$RSYNC -av --read-batch=BATCH \"$todir\"" "$fromdir" "$todir"'
23
24build_rsyncd_conf
25
26RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon"
27export RSYNC_CONNECT_PROG
28
29rm -rf "$todir"
30runtest "daemon sender --write-batch" 'checkit "$RSYNC -av --write-batch=BATCH rsync://localhost/test-from/ \"$todir\"" "$chkdir" "$todir"'
31
32rm -rf "$todir"
33runtest "--read-batch from daemon" 'checkit "$RSYNC -av --read-batch=BATCH \"$todir\"" "$chkdir" "$todir"'
34
35rm -rf "$todir"
36runtest "BATCH.sh use of --read-batch" 'checkit "./BATCH.sh" "$chkdir" "$todir"'
37
38rm -rf "$todir"
39mkdir "$todir" || test_fail "failed to restore empty destination directory"
40runtest "daemon recv --write-batch" 'checkit "$RSYNC -av --write-batch=BATCH \"$fromdir/\" rsync://localhost/test-to" "$chkdir" "$todir"'
41
42# The script would have aborted on error, so getting here means we pass.
43exit 0