From: Howard Chu Date: Tue, 11 Oct 2022 16:03:34 +0000 (+0100) Subject: ITS#9931 test scripts: fix BSD vs GNU date syntax X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=572a9a1597bee0b83a60ffc297aa597f429416a1;p=thirdparty%2Fopenldap.git ITS#9931 test scripts: fix BSD vs GNU date syntax --- diff --git a/tests/scripts/lloadd-all b/tests/scripts/lloadd-all index 07a90de867..34a2d87e02 100755 --- a/tests/scripts/lloadd-all +++ b/tests/scripts/lloadd-all @@ -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