diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-26 18:42:49 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-26 18:42:49 +0100 |
commit | 47fb9cb807d9c646cb07e56e380f3c553176955c (patch) | |
tree | 2d31163c8f371b4ec04862e0d3e5d539578da99a /tests | |
parent | 4989036e70a8538568d672602c96d828970df033 (diff) | |
download | rsyslog-47fb9cb807d9c646cb07e56e380f3c553176955c.tar.gz rsyslog-47fb9cb807d9c646cb07e56e380f3c553176955c.tar.xz rsyslog-47fb9cb807d9c646cb07e56e380f3c553176955c.zip |
added some missing files in tests Makefile.am
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 12 | ||||
-rw-r--r-- | tests/parser.tcl | 23 |
2 files changed, 14 insertions, 21 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 225f087f..5b579017 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,10 +1,10 @@ check_PROGRAMS = rt_init rscript TESTS = $(check_PROGRAMS) cfg.sh parsertest TESTS_ENVIRONMENT = RSYSLOG_MODDIR='$(abs_top_builddir)'/runtime/.libs/ -#TESTS = $(check_PROGRAMS) test_files = testbench.h runtime-dummy.c -EXTRA_DIST=1.rstest 2.rstest 3.rstest err1.rstest \ +EXTRA_DIST=parser.tcl \ + 1.rstest 2.rstest 3.rstest err1.rstest \ cfg.sh \ cfg1.cfgtest \ cfg1.testin \ @@ -17,9 +17,13 @@ EXTRA_DIST=1.rstest 2.rstest 3.rstest err1.rstest \ DevNull.cfgtest \ err1.rstest \ NoExistFile.cfgtest \ + testruns/1.parse1 \ + testruns/rfc3164.parse1 \ + testruns/rfc5424-1.parse1 \ + testruns/rfc5424-2.parse1 \ + testruns/rfc5424-3.parse1 \ + testruns/rfc5424-4.parse1 \ parsertest - parser.tcl - testruns/*.parser1 rt_init_SOURCES = rt-init.c $(test_files) rt_init_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) diff --git a/tests/parser.tcl b/tests/parser.tcl index 6b08717b..5872fa3c 100644 --- a/tests/parser.tcl +++ b/tests/parser.tcl @@ -14,19 +14,9 @@ # # This file is part of rsyslog. - - -# HELP HELP HELP HELP HELP HELP HELP HELP -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# If you happen to know how to disable rsyslog's -# stdout from appearing on the "real" stdout, please -# let me know. This is annouying, but I have no more -# time left to invest finding a solution (as the -# rest basically works well...). -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - package require Expect package require udp 1.0 +log_user 0; # comment this out if you would like to see rsyslog output for testing set rsyslogdPID [spawn "../tools/rsyslogd" "-c4" "-ftestruns/parser.conf" "-u2" "-n" "-iwork/rsyslog.pid" "-M../runtime/.libs"]; #interact; @@ -35,12 +25,12 @@ set udpSock [udp_open]; udp_conf $udpSock 127.0.0.1 514 set files [glob "testruns/*.parse1"] set failed 0; -puts "\n"; +puts "\nExecuting parser test suite..."; -set i 1; +set i 0; foreach testcase $files { - puts "testing $testcase ..."; + puts "testing $testcase"; set fp [open "$testcase" r]; fconfigure $fp -buffering line gets $fp input @@ -54,14 +44,13 @@ foreach testcase $files { # get response and compare expect -re "{{.*}}"; - puts "\n"; # at least we make the output readbale... set result $expect_out(buffer); set result [string trimleft $result "\{\{"]; set result [string trimright $result "\}\}"]; if { $result != $expected } { - puts "test $i failed!\n"; + puts "failed!"; puts "expected: '$expected'\n"; puts "returned: '$result'\n"; puts "\n"; @@ -73,5 +62,5 @@ foreach testcase $files { exec kill $rsyslogdPID; close $udpSock; -puts "Number of failed tests: $failed.\n"; +puts "Total number of tests: $i, number of failed tests: $failed.\n"; if { $failed != 0 } { exit 1 }; |