From 572a9a1597bee0b83a60ffc297aa597f429416a1 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 11 Oct 2022 17:03:34 +0100 Subject: [PATCH] ITS#9931 test scripts: fix BSD vs GNU date syntax --- tests/scripts/lloadd-all | 9 +++++++++ 1 file changed, 9 insertions(+) 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