mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-06-09 08:42:22 -04:00
ITS#9931 test scripts: fix BSD vs GNU date syntax
This commit is contained in:
parent
a858f892b3
commit
62f52807e2
2 changed files with 12 additions and 1 deletions
|
|
@ -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 $BACKEND"
|
||||
|
||||
if [ -n "$NOEXIT" ]; then
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
timer() {
|
||||
if [ -n "$STARTTIME" ]; then
|
||||
date -u -d "now - $STARTTIME sec" +%T
|
||||
now=`date +%s`
|
||||
delta=`expr $now - $STARTTIME`
|
||||
date -u $DATEOPT$delta +%T
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue