diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-23 07:10:03 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-23 07:10:03 +0100 |
commit | d2f242edcb25e69ae7de5a142229330070f2e70b (patch) | |
tree | 8f25fa8de784c877cda4c17452955234cdc2f95e /tests/longrun.sh | |
parent | 396e211e5cfd195b7135947d425b089a0447fa88 (diff) | |
parent | 2f1d5a12037453792eb1000c79daf737b41c5ba4 (diff) | |
download | rsyslog-d2f242edcb25e69ae7de5a142229330070f2e70b.tar.gz rsyslog-d2f242edcb25e69ae7de5a142229330070f2e70b.tar.xz rsyslog-d2f242edcb25e69ae7de5a142229330070f2e70b.zip |
Merge branch 'v4-stable' into v4-stable-solaris
Diffstat (limited to 'tests/longrun.sh')
-rwxr-xr-x | tests/longrun.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/longrun.sh b/tests/longrun.sh new file mode 100755 index 00000000..407e9fa9 --- /dev/null +++ b/tests/longrun.sh @@ -0,0 +1,30 @@ +# This is a test-aid script to try running some tests through many iterations. +# It is not yet used in the automated testbench, but I keep this file so that +# I can use it whenever there is need to. As such, it currently does not have +# parameters but is expected to be edited as needed. -- rgerhards, 2010-03-10 +# +# use: ./longrun.sh testname.sh +# +# where testname.sh is the test to be run +# to change other params, you need to edit the settings here below: +MAXRUNS=10 +DISPLAYALIVE=100 +LOGFILE=runlog + +echo "logfile is $LOGFILE" +echo "executing test $1" + +date > $LOGFILE + +for (( i=0; $i < 10000; i++ )) + do + if [ $(( i % DISPLAYALIVE )) -eq 0 ]; then + echo "$i iterations done" + fi + $1 >> $LOGFILE + if [ "$?" -ne "0" ]; then + echo "Test failed in iteration $i, review $LOGFILE for details!" + exit 1 + fi + done +echo "No failure in $i iterations." |