From: Howard Chu Date: Tue, 11 Oct 2022 14:14:54 +0000 (+0100) Subject: ITS#9931 test scripts: fix BSD vs GNU date syntax X-Git-Tag: OPENLDAP_REL_ENG_2_5_14~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edb67331c1e037fe9a244e0f7316bb5a3467ba49;p=thirdparty%2Fopenldap.git ITS#9931 test scripts: fix BSD vs GNU date syntax --- diff --git a/tests/scripts/all b/tests/scripts/all index e11b85fbea..575c58cd0b 100755 --- a/tests/scripts/all +++ b/tests/scripts/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 $BACKEND" if [ -n "$NOEXIT" ]; then