mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 16:50:42 +01:00
FreeBSD is not able to run all tests, therefore all tests that can't be run will be disabled.
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# This is part of the rsyslog testbench, licensed under GPLv3
|
|
export TESTMESSAGES=10000
|
|
export TESTMESSAGESFULL=19999
|
|
|
|
echo [imfile-rename.sh]
|
|
|
|
uname
|
|
if [ `uname` = "FreeBSD" ] ; then
|
|
echo "This test currently does not work on FreeBSD."
|
|
exit 77
|
|
fi
|
|
|
|
if [ `uname` = "SunOS" ] ; then
|
|
echo "Solaris does not support inotify."
|
|
exit 77
|
|
fi
|
|
|
|
. $srcdir/diag.sh init
|
|
|
|
# generate input file first.
|
|
./inputfilegen -m $TESTMESSAGES > rsyslog.input.1.log
|
|
ls -l rsyslog.input*
|
|
|
|
. $srcdir/diag.sh startup imfile-wildcards-simple.conf
|
|
|
|
# sleep a little to give rsyslog a chance to begin processing
|
|
sleep 5
|
|
|
|
# Move to another filename
|
|
mv rsyslog.input.1.log rsyslog.input.2.log
|
|
|
|
# generate some more input into moved file
|
|
./inputfilegen -m $TESTMESSAGES -i $TESTMESSAGES >> rsyslog.input.2.log
|
|
ls -l rsyslog.input*
|
|
|
|
# sleep a little to give rsyslog a chance to begin processing
|
|
sleep 5
|
|
|
|
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
|
. $srcdir/diag.sh wait-shutdown # we need to wait until rsyslogd is finished!
|
|
. $srcdir/diag.sh seq-check 0 $TESTMESSAGESFULL
|
|
. $srcdir/diag.sh exit
|