mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 23:10:41 +01:00
This is work torward the ability to run the testbench in parallel. Some small issues in tests have also been detected, which were not previously seen. They have been fixed. We did not do separate commits for this as it would clutter the commit log with not really relevant info. Also move some cleanup to "make clean" target To support parallel testbench runs, we need to have dynamic work files. So deleting work files on each test does not work, especially as we can no longer assume they are "left-overs" from a failed test - they may actually (and quite likely) belong to tests that run in parallel. So the proper solution is to do via "make clean". closes https://github.com/rsyslog/rsyslog/pull/2916
33 lines
785 B
Bash
Executable File
33 lines
785 B
Bash
Executable File
#!/bin/bash
|
|
# added 2016-12-11 by rgerhards
|
|
# This file is part of the rsyslog project, released under ASL 2.0
|
|
. $srcdir/diag.sh init
|
|
generate_conf
|
|
add_conf '
|
|
template(name="outfmt" type="list") {
|
|
property(name="msg" field.delimiter="58" field.number="2")
|
|
constant(value="\n")
|
|
}
|
|
|
|
ruleset(name="rs") {
|
|
action(type="omfile" file="./'"${RSYSLOG2_OUT_LOG}"'" template="outfmt")
|
|
}
|
|
|
|
if $msg contains "msgnum" then
|
|
call_indirect "does-not-exist";
|
|
else
|
|
action(type="omfile" file=`echo $RSYSLOG_OUT_LOG`)
|
|
'
|
|
startup
|
|
. $srcdir/diag.sh injectmsg 0 5
|
|
shutdown_when_empty
|
|
wait_shutdown
|
|
grep "error.*does-not-exist" $RSYSLOG_OUT_LOG > /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo
|
|
echo "FAIL: expected error message not found. $RSYSLOG_OUT_LOG is:"
|
|
cat $RSYSLOG_OUT_LOG
|
|
error_exit 1
|
|
fi
|
|
exit_test
|