merge branch ucx-3.1

Thu, 23 May 2024 23:23:36 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 23 May 2024 23:23:36 +0200
changeset 818
bc782cca0759
parent 817
22257f6d06a3 (diff)
parent 816
839fefbdedc7 (current diff)
child 820
d0cccee15a7c

merge branch ucx-3.1

--- a/test/bin-test/test-dav-sync-metadata1.sh	Thu May 23 22:35:45 2024 +0200
+++ b/test/bin-test/test-dav-sync-metadata1.sh	Thu May 23 23:23:36 2024 +0200
@@ -38,12 +38,16 @@
 	exit 1
 fi
 
-TEST=`uname | grep BSD`
-if [ $? -eq 0 ];
+# stat parameter for getting unix time
+STAT_TIME_FMT="-c %Y"
+
+if uname -a | grep BSD > /dev/null;
 then
-	alias stat_="stat -f %m"
-else
-	alias stat_="stat -c %Y"
+	STAT_TIME_FMT="-f %m"
+fi
+if uname -a | grep Darwin >  /dev/null;
+then
+	STAT_TIME_FMT="-f %m"
 fi
 
 XATTR=../../build/bin/xattrtool
@@ -159,11 +163,11 @@
 check_tmpout "0 conflicts" "test 2: wrong conflict counter (pull)"
 check_tmpout "0 errors" "test 2: wrong error counter (pull)"
 
-MTIMEA1=`stat_ tmp-sync/test4a/file1`
-MTIMEB1=`stat_ tmp-sync/test4b/file1`
+MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/file1`
+MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/file1`
 
-MTIMEA2=`stat_ tmp-sync/test4a/dir1/file2`
-MTIMEB2=`stat_ tmp-sync/test4b/dir1/file2`
+MTIMEA2=`stat $STAT_TIME_FMT tmp-sync/test4a/dir1/file2`
+MTIMEB2=`stat $STAT_TIME_FMT tmp-sync/test4b/dir1/file2`
 
 if [ $MTIMEA1 != $MTIMEB1 ]; then
 	echo "file1: mtime not synced"
@@ -190,8 +194,8 @@
 check_tmpout "0 conflicts" "test 3: wrong conflict counter (pull)"
 check_tmpout "0 errors" "test 3: wrong error counter (pull)"
 
-MTIMEA1=`stat_ tmp-sync/test4a/file1`
-MTIMEB1=`stat_ tmp-sync/test4b/file1`
+MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/file1`
+MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/file1`
 
 if [ $MTIMEA1 != $MTIMEB1 ]; then
 	echo "file1: mtime not synced"
--- a/test/bin-test/test-dav-sync-metadata3.sh	Thu May 23 22:35:45 2024 +0200
+++ b/test/bin-test/test-dav-sync-metadata3.sh	Thu May 23 23:23:36 2024 +0200
@@ -43,13 +43,11 @@
 # stat parameter for getting unix time
 STAT_TIME_FMT="-c %Y"
 
-TEST=`uname -a | grep BSD`
-if [ $? -ne 0 ];
+if uname -a | grep BSD > /dev/null;
 then
 	STAT_TIME_FMT="-f %m"
 fi
-TEST=`uname -a | grep Darwin`
-if [ $? -ne 0 ];
+if uname -a | grep Darwin >  /dev/null;
 then
 	STAT_TIME_FMT="-f %m"
 fi

mercurial