summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-03-31 22:03:02 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-03-31 22:03:02 +0200
commit91d6888a8afe562bf4d2ef53be94c41898e1a2ec (patch)
treefb18c77a4813e039fa0d778f512ee53dde16c66e
parentec9e031599016b9eb6f9ac3fd8298ee4fcb0364f (diff)
downloadrsyslog-91d6888a8afe562bf4d2ef53be94c41898e1a2ec.tar.gz
rsyslog-91d6888a8afe562bf4d2ef53be94c41898e1a2ec.tar.xz
rsyslog-91d6888a8afe562bf4d2ef53be94c41898e1a2ec.zip
bugfix: "make distcheck" did not work
-rw-r--r--tests/parsertest.c12
-rw-r--r--tests/testruns/parser.conf2
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/parsertest.c b/tests/parsertest.c
index 3ccae3d6..6c2221e8 100644
--- a/tests/parsertest.c
+++ b/tests/parsertest.c
@@ -105,7 +105,7 @@ int openPipe(pid_t *pid, int *pfd)
char *newenviron[] = { NULL };
- sprintf(confFile, "-f%s/testruns/parser2.conf", getenv("srcdir"));
+ sprintf(confFile, "-f%s/testruns/parser.conf", getenv("srcdir"));
newargv[1] = confFile;
if (pipe(pipefd) == -1) {
@@ -232,7 +232,13 @@ doTests(int fd, char *files)
}
globfree(&testFiles);
- printf("Number of tests run: %d, number of failures: %d\n", iTests, iFailed);
+ if(iTests == 0) {
+ printf("Error: no test cases found, no tests executed.\n");
+ iFailed = 1;
+ } else {
+ printf("Number of tests run: %d, number of failures: %d\n", iTests, iFailed);
+ }
+
return(iFailed);
}
@@ -261,5 +267,3 @@ int main(int argc, char *argv[])
printf("End of parser tests.\n");
exit(ret);
}
-
-
diff --git a/tests/testruns/parser.conf b/tests/testruns/parser.conf
index 8d32746c..0fb7d16d 100644
--- a/tests/testruns/parser.conf
+++ b/tests/testruns/parser.conf
@@ -5,5 +5,5 @@ $UDPServerRun 12514
$ErrorMessagesToStderr off
# use a special format that we can easily parse in expect
-$template expect,"{{%PRI%,%syslogfacility-text%,%syslogseverity-text%,%timestamp%,%hostname%,%programname%,%syslogtag%,%msg%}}"
+$template expect,"%PRI%,%syslogfacility-text%,%syslogseverity-text%,%timestamp%,%hostname%,%programname%,%syslogtag%,%msg%\n"
*.* :omstdout:;expect