diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-20 15:08:39 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-20 15:08:39 +0200 |
commit | 24a248d021c9d2c19b71eef26d3ddf8731e4541b (patch) | |
tree | e84c785554329456a78656998e638be0c17c6b90 /tests | |
parent | b24af91ada128cabdfe79a3f70d5a9a508bf9f2a (diff) | |
download | rsyslog-24a248d021c9d2c19b71eef26d3ddf8731e4541b.tar.gz rsyslog-24a248d021c9d2c19b71eef26d3ddf8731e4541b.tar.bz2 rsyslog-24a248d021c9d2c19b71eef26d3ddf8731e4541b.zip |
Implement RainerScript prifield() function
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rwxr-xr-x | tests/rscript_prifilt.sh | 13 | ||||
-rw-r--r-- | tests/testsuites/rscript_prifilt.conf | 10 |
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index db505a2f..4765e917 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -68,6 +68,7 @@ TESTS += \ rscript_field.sh \ rscript_stop.sh \ rscript_stop2.sh \ + rscript_prifilt.sh \ cee_simple.sh \ cee_diskqueue.sh \ linkedlistqueue.sh @@ -278,6 +279,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/rscript_stop.conf \ rscript_stop2.sh \ testsuites/rscript_stop2.conf \ + rscript_prifilt.sh \ + testsuites/rscript_prifilt.conf \ cee_simple.sh \ testsuites/cee_simple.conf \ cee_diskqueue.sh \ diff --git a/tests/rscript_prifilt.sh b/tests/rscript_prifilt.sh new file mode 100755 index 00000000..815492ab --- /dev/null +++ b/tests/rscript_prifilt.sh @@ -0,0 +1,13 @@ +# added 2012-09-20 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_prifilt.sh\]: testing rainerscript prifield\(\) function +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_prifilt.conf +source $srcdir/diag.sh injectmsg 0 5000 +echo doing shutdown +source $srcdir/diag.sh shutdown-when-empty +echo wait on shutdown +source $srcdir/diag.sh wait-shutdown +source $srcdir/diag.sh seq-check 0 4999 +source $srcdir/diag.sh exit diff --git a/tests/testsuites/rscript_prifilt.conf b/tests/testsuites/rscript_prifilt.conf new file mode 100644 index 00000000..8cb13a0f --- /dev/null +++ b/tests/testsuites/rscript_prifilt.conf @@ -0,0 +1,10 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="list") { + property(name="msg" field.delimiter="58" field.number="2") + constant(value="\n") +} + +/* tcpflood uses local4.=debug, we use a bit more generic filter */ +if prifilt("local4.*") then + action(type="omfile" file="./rsyslog.out.log" template="outfmt") |