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-Tag: OPENLDAP_REL_ENG_2_5_14~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1112612b26a2ae2389371df7b3fb3feb19577360;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 d531534164..ef1dba1ef8 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 ">>>>> Executing all LDAP tests for the Load Balancer" if [ -n "$NOEXIT" ]; then