]> 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 16:03:34 +0000 (17:03 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 13 Oct 2022 15:44:12 +0000 (15:44 +0000)
tests/scripts/lloadd-all

index 07a90de867e9e1809fddb5bbea1e419ccc684720..34a2d87e02271555cbfbbbec5dcbd4e85dad6508 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 ">>>>> $(timer) Executing all LDAP tests for the Load Balancer"
 
 if [ -n "$NOEXIT" ]; then