rsyslog/tests/dircreate_dflt.sh
Rainer Gerhards a43a03f17e
testbench: make more test file names dynamic
This is required to support parallel test runs.

Among others, make thise files dynamic:
* test-spool
* rsyslog.input
* rsyslog.out*.log
* tmp.in

Also:
* convert presort test statement to function
* cleanup imfile truncation test
* cleanup imfile-growing-file-id test
  some cruft was left due to copy and paste error
* serialize mysql tests
2018-08-29 10:46:32 +02:00

28 lines
884 B
Bash
Executable File

#!/bin/bash
# Test for automatic creation of dynafile directories
# note that we use the "'${RSYSLOG_DYNNAME}'.spool" directory, because it is handled by diag.sh
# in any case, so we do not need to add any extra new test dir.
# added 2009-11-30 by Rgerhards
# This file is part of the rsyslog project, released under ASL 2.0
. $srcdir/diag.sh init
generate_conf
add_conf '
# set spool locations and switch queue to disk-only mode
$WorkDirectory '$RSYSLOG_DYNNAME'.spool
$MainMsgQueueFilename mainq
$MainMsgQueueType disk
$template dynfile,"'$RSYSLOG_DYNNAME'.logdir/'$RSYSLOG_OUT_LOG'"
*.* ?dynfile
'
startup
injectmsg 0 1 # a single message is sufficient
shutdown_when_empty # shut down rsyslogd when done processing messages
wait_shutdown
if [ ! -e $RSYSLOG_DYNNAME.logdir/$RSYSLOG_OUT_LOG ]
then
echo "$RSYSLOG_DYNNAME.logdir or logfile not created!"
error_exit 1
fi
exit_test