test/bin-test/test-dav-sync-metadata1.sh

changeset 736
40be8db6fe45
parent 671
5256d7eb69e7
child 763
fc24d1d1d695
equal deleted inserted replaced
735:74a6e2d4fb1f 736:40be8db6fe45
34 fi 34 fi
35 if [ -z "$DAV_SYNC_BIN" ]; 35 if [ -z "$DAV_SYNC_BIN" ];
36 then 36 then
37 echo "DAV_BIN variable not set" 37 echo "DAV_BIN variable not set"
38 exit 1 38 exit 1
39 fi
40
41 TEST=`uname | grep BSD`
42 if [ $? -eq 0 ];
43 then
44 alias stat_="stat -f %m"
45 else
46 alias stat_="stat -c %Y"
39 fi 47 fi
40 48
41 XATTR=../../build/xattrtool 49 XATTR=../../build/xattrtool
42 50
43 # checks if tmp-sync/out.txt contains a specific text 51 # checks if tmp-sync/out.txt contains a specific text
149 dav_sync_pull test4b "test 2: pull failed" 157 dav_sync_pull test4b "test 2: pull failed"
150 check_tmpout "2 files pulled" "test 2: wrong pull counter" 158 check_tmpout "2 files pulled" "test 2: wrong pull counter"
151 check_tmpout "0 conflicts" "test 2: wrong conflict counter (pull)" 159 check_tmpout "0 conflicts" "test 2: wrong conflict counter (pull)"
152 check_tmpout "0 errors" "test 2: wrong error counter (pull)" 160 check_tmpout "0 errors" "test 2: wrong error counter (pull)"
153 161
154 MTIMEA1=`stat -c %Y tmp-sync/test4a/file1` 162 MTIMEA1=`stat_ tmp-sync/test4a/file1`
155 MTIMEB1=`stat -c %Y tmp-sync/test4b/file1` 163 MTIMEB1=`stat_ tmp-sync/test4b/file1`
156 164
157 MTIMEA2=`stat -c %Y tmp-sync/test4a/dir1/file2` 165 MTIMEA2=`stat_ tmp-sync/test4a/dir1/file2`
158 MTIMEB2=`stat -c %Y tmp-sync/test4b/dir1/file2` 166 MTIMEB2=`stat_ tmp-sync/test4b/dir1/file2`
159 167
160 if [ $MTIMEA1 != $MTIMEB1 ]; then 168 if [ $MTIMEA1 != $MTIMEB1 ]; then
161 echo "file1: mtime not synced" 169 echo "file1: mtime not synced"
162 exit 2 170 exit 2
163 fi 171 fi
181 dav_sync_pull test4b "test 3: pull failed" 189 dav_sync_pull test4b "test 3: pull failed"
182 check_tmpout "1 file pulled" "test 3: wrong pull counter" 190 check_tmpout "1 file pulled" "test 3: wrong pull counter"
183 check_tmpout "0 conflicts" "test 3: wrong conflict counter (pull)" 191 check_tmpout "0 conflicts" "test 3: wrong conflict counter (pull)"
184 check_tmpout "0 errors" "test 3: wrong error counter (pull)" 192 check_tmpout "0 errors" "test 3: wrong error counter (pull)"
185 193
186 MTIMEA1=`stat -c %Y tmp-sync/test4a/file1` 194 MTIMEA1=`stat_ tmp-sync/test4a/file1`
187 MTIMEB1=`stat -c %Y tmp-sync/test4b/file1` 195 MTIMEB1=`stat_ tmp-sync/test4b/file1`
188 196
189 if [ $MTIMEA1 != $MTIMEB1 ]; then 197 if [ $MTIMEA1 != $MTIMEB1 ]; then
190 echo "file1: mtime not synced" 198 echo "file1: mtime not synced"
191 exit 2 199 exit 2
192 fi 200 fi

mercurial