From 02c6a0ad553ad51f91af9d9e6c28f2529e759305 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 12 Mar 2013 12:04:08 +0200 Subject: Enable notification tests conditionally. The tests are enabled only if the mailutils module is built. * configure.ac (WD_MAILUTILS): New subst variable. * tests/atlocal.in (WD_MAILUTILS): New variable. * tests/testsuite.at (AT_MAILUTILS_PREREQ): New macro. * tests/check-notify.at: Skip the test if mailutils is not configured. * tests/mailstats.at: Likewise. * tests/notify-upl.at: Likewise. * modules/mailutils/mod_mailutils.c (get_uploader_email): Simplify the signature. (expand_email_admin,expand_email_owner): Make static. * src/wydawca.h (expand_email_admin,expand_email_owner): Remove protos. --- tests/atlocal.in | 1 + tests/check-notify.at | 1 + tests/mailstats.at | 1 + tests/notify-upl.at | 1 + tests/testsuite.at | 2 ++ 5 files changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/atlocal.in b/tests/atlocal.in index 89cfd3f..2f01c30 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -12,6 +12,7 @@ WD_CONFSRC=@abs_top_srcdir@/tests/etc WD_DISTDIR=@abs_top_srcdir@/tests/dist WD_SRC=@abs_top_builddir@/tests/source WD_DST=@abs_top_builddir@/tests/dest +WD_MAILUTILS=@WD_MAILUTILS@ MKDIR_P="@MKDIR_P@" wydawca_init_testdirs() { diff --git a/tests/check-notify.at b/tests/check-notify.at index bebfa4b..d31e1b9 100644 --- a/tests/check-notify.at +++ b/tests/check-notify.at @@ -68,6 +68,7 @@ The Project Submission Robot ]) AT_CHECK([ +AT_MAILUTILS_PREREQ wydawca_init_testdirs wydawca_config wydawca.rc mv wydawca.rc simple.rc diff --git a/tests/mailstats.at b/tests/mailstats.at index e5c769d..a7a9bae 100644 --- a/tests/mailstats.at +++ b/tests/mailstats.at @@ -67,6 +67,7 @@ Wydawca ]) AT_CHECK([ +AT_MAILUTILS_PREREQ wydawca_init_testdirs wydawca_config wydawca.rc wydawca_config mailstats.rc diff --git a/tests/notify-upl.at b/tests/notify-upl.at index b6425ba..60574a9 100644 --- a/tests/notify-upl.at +++ b/tests/notify-upl.at @@ -79,6 +79,7 @@ s,^-[[rwx-]]\{9\} @USER@.*file.sig$,listing of file.sig, ]) AT_CHECK([ +AT_MAILUTILS_PREREQ wydawca_init_testdirs wydawca_config wydawca.rc mv wydawca.rc simple.rc diff --git a/tests/testsuite.at b/tests/testsuite.at index d0195e3..16e5a41 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -23,6 +23,8 @@ m4_define([AT_SORT_PREREQ],[ test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST ]) +m4_define([AT_MAILUTILS_PREREQ],[test "$WD_MAILUTILS" = yes || AT_SKIP_TEST]) + AT_INIT AT_TESTED([wydawca]) m4_include([version.at]) -- cgit v1.2.1