diff options
author | Michael Biebl <biebl@debian.org> | 2012-10-29 16:27:53 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2012-10-29 16:27:53 +0100 |
commit | 05bd88b115965e17631a4af10c84d71622fe4e3d (patch) | |
tree | c5aaea610fdd889c119a6eecc8cbda571874a9c9 /tests | |
parent | 30d3515e017ba4b2d74c55c2ad7b897b8a9eb020 (diff) | |
download | rsyslog-05bd88b115965e17631a4af10c84d71622fe4e3d.tar.gz |
Imported Upstream version 7.2.1upstream/7.2.1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/Makefile.in | 3 | ||||
-rwxr-xr-x | tests/rscript_ruleset_call.sh | 13 | ||||
-rw-r--r-- | tests/testsuites/rscript_ruleset_call.conf | 22 |
4 files changed, 41 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 715c024..7ccefb0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -70,6 +70,7 @@ TESTS += \ rscript_stop2.sh \ rscript_prifilt.sh \ rscript_optimizer1.sh \ + rscript_ruleset_call.sh \ cee_simple.sh \ cee_diskqueue.sh \ linkedlistqueue.sh @@ -284,6 +285,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/rscript_prifilt.conf \ rscript_optimizer1.sh \ testsuites/rscript_optimizer1.conf \ + rscript_ruleset_call.sh \ + testsuites/rscript_ruleset_call.conf \ cee_simple.sh \ testsuites/cee_simple.conf \ cee_diskqueue.sh \ diff --git a/tests/Makefile.in b/tests/Makefile.in index ec789f5..5ce9184 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -542,6 +542,8 @@ EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/rscript_prifilt.conf \ rscript_optimizer1.sh \ testsuites/rscript_optimizer1.conf \ + rscript_ruleset_call.sh \ + testsuites/rscript_ruleset_call.conf \ cee_simple.sh \ testsuites/cee_simple.conf \ cee_diskqueue.sh \ @@ -1232,6 +1234,7 @@ uninstall-am: @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_stop2.sh \ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_prifilt.sh \ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_optimizer1.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_ruleset_call.sh \ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ cee_simple.sh \ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ cee_diskqueue.sh \ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ linkedlistqueue.sh diff --git a/tests/rscript_ruleset_call.sh b/tests/rscript_ruleset_call.sh new file mode 100755 index 0000000..e29f21d --- /dev/null +++ b/tests/rscript_ruleset_call.sh @@ -0,0 +1,13 @@ +# added 2012-10-29 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_ruleset_call.sh\]: testing rainerscript ruleset\(\) and call statement +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_ruleset_call.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_ruleset_call.conf b/tests/testsuites/rscript_ruleset_call.conf new file mode 100644 index 0000000..96eab29 --- /dev/null +++ b/tests/testsuites/rscript_ruleset_call.conf @@ -0,0 +1,22 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="list") { + property(name="msg" field.delimiter="58" field.number="2") + constant(value="\n") +} + + +# we deliberately include continue/stop to make sure we have more than +# one statement. This catches grammar erorrs +ruleset(name="rs2") { + continue + action(type="omfile" file="./rsyslog.out.log" template="outfmt") + stop +} + +# this time we make sure a single statement is properly supported +ruleset(name="rs1") { + call rs2 +} + +if $msg contains 'msgnum' then call rs1 |