summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-09-21 10:41:05 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-21 10:41:05 +0200
commit87f415f16fec001a4f87e18817bace73f19d6416 (patch)
tree400d0e8ccd876cb40c1b6d59bc08b48a0034ae14 /tests
parentbda0ef62f01ab86f5f4d84fb3d0eb25c14aaea55 (diff)
downloadrsyslog-87f415f16fec001a4f87e18817bace73f19d6416.tar.gz
rsyslog-87f415f16fec001a4f87e18817bace73f19d6416.tar.xz
rsyslog-87f415f16fec001a4f87e18817bace73f19d6416.zip
Implement script optimization IF -> PRIFILT
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am3
-rwxr-xr-xtests/rscript_optimizer1.sh13
-rw-r--r--tests/testsuites/rscript_optimizer1.conf12
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4765e917..715c024d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -69,6 +69,7 @@ TESTS += \
rscript_stop.sh \
rscript_stop2.sh \
rscript_prifilt.sh \
+ rscript_optimizer1.sh \
cee_simple.sh \
cee_diskqueue.sh \
linkedlistqueue.sh
@@ -281,6 +282,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/rscript_stop2.conf \
rscript_prifilt.sh \
testsuites/rscript_prifilt.conf \
+ rscript_optimizer1.sh \
+ testsuites/rscript_optimizer1.conf \
cee_simple.sh \
testsuites/cee_simple.conf \
cee_diskqueue.sh \
diff --git a/tests/rscript_optimizer1.sh b/tests/rscript_optimizer1.sh
new file mode 100755
index 00000000..1d2dcf87
--- /dev/null
+++ b/tests/rscript_optimizer1.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_optimizer1.sh\]: testing rainerscript optimizer
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup rscript_optimizer1.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_optimizer1.conf b/tests/testsuites/rscript_optimizer1.conf
new file mode 100644
index 00000000..7720af7a
--- /dev/null
+++ b/tests/testsuites/rscript_optimizer1.conf
@@ -0,0 +1,12 @@
+$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 */
+if prifilt("syslog.*") then
+ stop # it actually doesn't matter what we do here
+else
+ action(type="omfile" file="./rsyslog.out.log" template="outfmt")