mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 13:09:42 -05:00
Add NOEXIT envvar to run all tests and tally failures
This commit is contained in:
parent
8d74f717ff
commit
9af5e181cb
1 changed files with 27 additions and 2 deletions
|
|
@ -21,10 +21,15 @@ if test -t 1 ; then
|
|||
TN=`$SHTOOL echo -e "%b" 2>/dev/null`
|
||||
fi
|
||||
|
||||
FAILCOUNT=0
|
||||
SLEEPTIME=10
|
||||
|
||||
echo ">>>>> Executing all LDAP tests for $BACKEND"
|
||||
|
||||
if [ -n "$NOEXIT" ]; then
|
||||
echo "Result Test" > $TESTWD/results
|
||||
fi
|
||||
|
||||
for CMD in $SRCDIR/scripts/test*; do
|
||||
case "$CMD" in
|
||||
*~) continue;;
|
||||
|
|
@ -57,11 +62,31 @@ EOF
|
|||
if test $RC -eq 0 ; then
|
||||
echo ">>>>> $CMD completed ${TB}OK${TN} for $BACKEND."
|
||||
else
|
||||
echo ">>>>> $CMD ${TB}failed${TN} for $BACKEND (exit $RC)"
|
||||
exit $RC
|
||||
echo ">>>>> $CMD ${TB}failed${TN} for $BACKEND"
|
||||
FAILCOUNT=`expr $FAILCOUNT + 1`
|
||||
|
||||
if [ -n "$NOEXIT" ]; then
|
||||
echo "Continuing..."
|
||||
else
|
||||
echo "(exit $RC)"
|
||||
exit $RC
|
||||
fi
|
||||
fi
|
||||
if [ -n "$NOEXIT" ]; then
|
||||
echo "$RC $CMD" >> $TESTWD/results
|
||||
fi
|
||||
|
||||
# echo ">>>>> waiting $SLEEPTIME seconds for things to exit"
|
||||
# sleep $SLEEPTIME
|
||||
echo ""
|
||||
done
|
||||
|
||||
if [ -n "$NOEXIT" ]; then
|
||||
if [ "$FAILCOUNT" -gt 0 ]; then
|
||||
cat $TESTWD/results
|
||||
echo "$FAILCOUNT tests failed. Please review the test log."
|
||||
exit $FAILCOUNT
|
||||
else
|
||||
echo "All tests succeeded."
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue