Fri, 25 Oct 2019 19:39:33 +0200
fix test system on solaris
--- a/test/bin-test/test-dav-sync-metadata1.sh Wed Oct 23 20:26:53 2019 +0200 +++ b/test/bin-test/test-dav-sync-metadata1.sh Fri Oct 25 19:39:33 2019 +0200 @@ -278,7 +278,7 @@ check_tmpout "0 conflicts" "test 5: wrong conflict counter (push)" check_tmpout "0 errors" "test 5: wrong error counter (push)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 5: wrong output (push)" exit 2 fi @@ -288,7 +288,7 @@ check_tmpout "0 conflicts" "test 5: wrong conflict counter (pull)" check_tmpout "0 errors" "test 5: wrong error counter (pull)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 5: wrong output (pull)" exit 2 fi @@ -340,7 +340,7 @@ check_tmpout "0 conflicts" "test 7: wrong conflict counter (push)" check_tmpout "0 errors" "test 7: wrong error counter (push)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 7: wrong output (push)" exit 2 fi @@ -350,7 +350,7 @@ check_tmpout "0 conflicts" "test 7: wrong conflict counter (pull)" check_tmpout "0 errors" "test 7: wrong error counter (pull)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 7: wrong output (pull)" exit 2 fi @@ -396,7 +396,7 @@ check_tmpout "0 conflicts" "test 9: wrong conflict counter (push)" check_tmpout "0 errors" "test 9: wrong error counter (push)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 9: wrong output (push)" exit 2 fi @@ -406,7 +406,7 @@ check_tmpout "0 conflicts" "test 9: wrong conflict counter (pull)" check_tmpout "0 errors" "test 9: wrong error counter (pull)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 9: wrong output (pull)" exit 2 fi @@ -459,7 +459,7 @@ check_tmpout "0 conflicts" "test 11: wrong conflict counter (push)" check_tmpout "0 errors" "test 11: wrong error counter (push)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 11: wrong output (push)" exit 2 fi @@ -469,7 +469,7 @@ check_tmpout "0 conflicts" "test 11: wrong conflict counter (pull)" check_tmpout "0 errors" "test 11: wrong error counter (pull)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 11: wrong output (pull)" exit 2 fi @@ -492,7 +492,7 @@ check_tmpout "0 conflicts" "test 12: wrong conflict counter (pull)" check_tmpout "0 errors" "test 12: wrong error counter (pull)" LN=`cat tmp-sync/out.txt | wc -l` -if [ "$LN" != "1" ]; then +if [ $LN -ne 1 ]; then echo "test 12: wrong output (pull)" exit 2 fi @@ -530,7 +530,7 @@ check_tmpout "update: /file4" "test 14: file 4 not pulled" LN=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file4 | wc -l` -if [ "$LN" != "0" ]; then +if [ $LN -ne 0 ]; then echo "test 14: wrong tag count" exit 2 fi
--- a/test/bin-test/test-dav-sync-pull1.sh Wed Oct 23 20:26:53 2019 +0200 +++ b/test/bin-test/test-dav-sync-pull1.sh Fri Oct 25 19:39:33 2019 +0200 @@ -154,7 +154,7 @@ check_tmpout "0 conflicts" "test4: wrong conflicts counter" OUT=`cat tmp-sync/out.txt | wc -l` -if [ "$OUT" != "1" ]; then +if [ $OUT -ne 1 ]; then echo "test4: wrong line count" exit 2 fi @@ -349,7 +349,7 @@ fi OUT=`ls tmp-sync/test1b/subdir/ | wc -l` -if [ "$OUT" != "0" ]; +if [ $OUT -ne 0 ]; then echo "test9: test1b/subdir not empty" exit 2 @@ -402,7 +402,7 @@ check_tmpout "0 conflicts" "test10: wrong conflicts counter" OUT=`ls tmp-sync/test1b/ | wc -l` -if [ $OUT != "0" ]; then +if [ $OUT -ne 0 ]; then echo "test1b not empty" exit 2 fi
--- a/test/bin-test/test-dav-sync-push1.sh Wed Oct 23 20:26:53 2019 +0200 +++ b/test/bin-test/test-dav-sync-push1.sh Fri Oct 25 19:39:33 2019 +0200 @@ -34,7 +34,7 @@ fi if [ -z "$DAV_SYNC_BIN" ]; then - echo "DAV_BIN variable not set" + echo "DAV_SYNC_BIN variable not set" exit 1 fi @@ -73,7 +73,7 @@ cp synctest/file1 tmp-sync/test1a cp synctest/file2 tmp-sync/test1a -OUT=`$DAV_SYNC_BIN push test1a | tail -n 1` +OUT=`$DAV_SYNC_BIN push test1a | tail -1` TEST=`echo $OUT | grep Result` if [ $? -ne 0 ]; @@ -110,7 +110,7 @@ dav_sync_push test1a "push 2 failed" OUT=`wc -l < tmp-sync/out.txt` -if [ "$OUT" != "1" ]; +if [ $OUT -ne 1 ]; then echo "push 2: number of output lines not 1" exit 2 @@ -133,7 +133,7 @@ dav_sync_push test1a "push 4 failed" OUT=`wc -l < tmp-sync/out.txt` -if [ "$OUT" != "1" ]; +if [ $OUT -ne 1 ]; then echo "push 4: number of output lines not 1" exit 2 @@ -190,7 +190,7 @@ check_tmpout "0 conflicts" "push6: wrong conflict counter" check_tmpout "0 errors" "push6: wrong error counter" OUT=`grep mkcol tmp-sync/out.txt | wc -l` -if [ "$OUT" != "48" ]; +if [ $OUT -ne 48 ]; then echo "push 6: number of mkcol output lines not 48" exit 2 @@ -271,7 +271,7 @@ echo "push 11: dav list failed" exit 2 fi -if [ "$OUT" != "0" ]; +if [ $OUT -ne 0 ]; then echo "push 11: dav-test-repo/sync/test1/ not empty" exit 2
--- a/test/bin-test/test-dav-sync.sh Wed Oct 23 20:26:53 2019 +0200 +++ b/test/bin-test/test-dav-sync.sh Fri Oct 25 19:39:33 2019 +0200 @@ -64,9 +64,8 @@ mkdir tmp-sync/test2a mkdir tmp-sync/test2b - # check if config works -TEST1_DIR=`$DAV_SYNC_BIN list-dirs | grep test1a | tail -n 1` +TEST1_DIR=`$DAV_SYNC_BIN list-dirs | grep test1a | tail -1` if [ -z $TEST1_DIR ]; then echo "Config not working"