]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9931 test scripts: fix BSD vs GNU date syntax
authorHoward Chu <hyc@openldap.org>
Tue, 11 Oct 2022 14:14:54 +0000 (15:14 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 13 Oct 2022 16:00:13 +0000 (16:00 +0000)
tests/scripts/all

index e11b85fbeab58db780af0fb3ae6e48dc20ad3a92..575c58cd0b10ce73e59aef5836bd4d6750fb4583 100755 (executable)
@@ -25,6 +25,15 @@ FAILCOUNT=0
 SKIPCOUNT=0
 SLEEPTIME=10
 
+# check for BSD vs GNU date
+date -j >/dev/null 2>&1
+RC=$?
+if [ $RC -ne 0 ]; then
+       DATEOPT="-d @"
+else
+       DATEOPT="-r "
+fi
+
 echo ">>>>> Executing all LDAP tests for $BACKEND"
 
 if [ -n "$NOEXIT" ]; then