Be more verbose so that we can debug what is going wrong on solaris.
[rsync/rsync.git] / testsuite / merge.test
CommitLineData
12865a97
WD
1#! /bin/sh
2
3# Copyright (C) 2004 by Wayne Davison <wayned@samba.org>
4
5# This program is distributable under the terms of the GNU GPL (see
6# COPYING).
7
8# Make sure we can merge files from multiple directories into one.
9
7892e5ac 10. "$suitedir/rsync.fns"
12865a97 11
12865a97
WD
12# Build some files/dirs/links to copy
13
10813368
WD
14# Use local dirnames to better exercise the arg-parsing code.
15cd "$tmpdir"
16
e911ff75 17mkdir from1 from2 from3 deep
10813368
WD
18mkdir from2/sub1 from3/sub1
19mkdir from3/sub2 from1/dir-and-not-dir
e911ff75 20mkdir chk chk/sub1 chk/sub2 chk/dir-and-not-dir
10813368
WD
21echo "one" >from1/one
22cp -p from1/one from2/one
23cp -p from1/one from3/one
24echo "two" >from1/two
25echo "three" >from2/three
26echo "four" >from3/four
27echo "five" >from1/five
28echo "six" >from3/six
29echo "sub1" >from2/sub1/uno
30cp -p from2/sub1/uno from3/sub1/uno
31echo "sub2" >from3/sub1/dos
32echo "sub3" >from2/sub1/tres
33echo "subby" >from3/sub2/subby
34echo "extra" >from1/dir-and-not-dir/inside
35echo "not-dir" >from3/dir-and-not-dir
e911ff75
WD
36echo "arg-test" >deep/arg-test
37echo "shallow" >shallow
10813368
WD
38
39cp -p from1/one from1/two from2/three from3/four from1/five from3/six chk
e911ff75 40cp -p deep/arg-test shallow chk
10813368
WD
41cp -p from1/dir-and-not-dir/inside chk/dir-and-not-dir
42cp -p from2/sub1/uno from3/sub1/dos from2/sub1/tres chk/sub1
43cp -p from3/sub2/subby chk/sub2
12865a97 44
bf10faa9
WD
45# Make sure that time has moved on.
46sleep 1
47
284d628a 48# Get rid of any directory-time differences
10813368
WD
49$RSYNC -av --existing -f 'exclude,! */' from1/ from2/
50$RSYNC -av --existing -f 'exclude,! */' from2/ from3/
51$RSYNC -av --existing -f 'exclude,! */' from1/ chk/
52$RSYNC -av --existing -f 'exclude,! */' from3/ chk/
12865a97 53
f1599b9e 54checkit "$RSYNC -avvvv deep/arg-test shallow from1/ from2/ from3/ to/" chk to
12865a97 55
05118158 56# The script would have aborted on error, so getting here means we've won.
12865a97 57exit 0