rsyslog/tests/loop.sh
Andre Lorbach 3b13693430 Tools: Man pages for tools were generated even with --disable-generate-man-pages
Man pages are not generated anymore when "--disable-generate-man-pages" is
configured. Also changed man-page rulepatterns makefile. The method
using $< refering to the prerequisite did not work proberly on FreeBSD.

closes https://github.com/rsyslog/rsyslog/issues/387
2015-07-24 10:21:58 +00:00

30 lines
773 B
Bash
Executable File

#!/bin/bash
# this is a small helper script used to run testbench tests
# repetetively. It is meant for manual use and not included
# in any testbench functionality.
# There are some options commented out, e.g. exit on first
# failuere. If that option is desired, it must be "commented
# in" -- we don't think it's worth to add proper options for that.
# Copyright (2015) by Rainer Gerhards, released under ASL 2.0
RUN=1
MAXRUN=50
SUCCESS=0
FAIL=0
while [ $RUN -le $MAXRUN ]; do
echo
echo "###### RUN: " $RUN "success" $SUCCESS "fail" $FAIL
$1
if [ "$?" -ne "0" ]; then
let FAIL+=1
echo "FAIL!"
#vi work
exit 1
else
let SUCCESS+=1
fi
let RUN+=1
done
echo
echo "Nbr success: " $SUCCESS
echo "Nbr fail...: " $FAIL