aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-03-12 12:04:08 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-03-12 12:04:08 +0200
commit02c6a0ad553ad51f91af9d9e6c28f2529e759305 (patch)
tree1aa932d4f8e938c570460c8fc414ff48309cc706 /tests
parent7c10eca883faa5dd5b01bf1e50b04abb792a6639 (diff)
downloadwydawca-02c6a0ad553ad51f91af9d9e6c28f2529e759305.tar.gz
wydawca-02c6a0ad553ad51f91af9d9e6c28f2529e759305.tar.bz2
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/atlocal.in1
-rw-r--r--tests/check-notify.at1
-rw-r--r--tests/mailstats.at1
-rw-r--r--tests/notify-upl.at1
-rw-r--r--tests/testsuite.at2
5 files changed, 6 insertions, 0 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 89cfd3f..2f01c30 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -9,12 +9,13 @@ XFAILFILE=$abs_builddir/.badversion
trap "cleanup; test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
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() {
for dir in "$WD_SRC" "$WD_SRC/test" "${WD_SRC}/fail" "${WD_SRC}/ok" "$WD_DST"
do
if test -d "$dir"; then
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
@@ -65,12 +65,13 @@ Please fix the tarball and resubmit.
Regards,
Wydawca
The Project Submission Robot
])
AT_CHECK([
+AT_MAILUTILS_PREREQ
wydawca_init_testdirs
wydawca_config wydawca.rc
mv wydawca.rc simple.rc
wydawca_config notify.rc
cat notify.rc simple.rc >> wydawca.rc
diff --git a/tests/mailstats.at b/tests/mailstats.at
index e5c769d..a7a9bae 100644
--- a/tests/mailstats.at
+++ b/tests/mailstats.at
@@ -64,12 +64,13 @@ symlinks removed ................... 0
Regards,
Wydawca
])
AT_CHECK([
+AT_MAILUTILS_PREREQ
wydawca_init_testdirs
wydawca_config wydawca.rc
wydawca_config mailstats.rc
cat mailstats.rc >> wydawca.rc
wydawca_upload test file
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
@@ -76,12 +76,13 @@ The Project Submission Robot
AT_DATA([ls.sin],
[s,^-[[rwx-]]\{9\} @USER@.*file$,listing of file,
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
wydawca_config notify.rc
cat notify.rc simple.rc >> wydawca.rc
wydawca_upload test file
diff --git a/tests/testsuite.at b/tests/testsuite.at
index d0195e3..16e5a41 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -20,12 +20,14 @@ m4_version_prereq([2.52g])
m4_define([AT_SKIP_TEST],[exit 77])
dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr
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])
m4_include([wordsplit.at])
m4_include([pushdir.at])
m4_include([backup00.at])

Return to:

Send suggestions and report system problems to the System administrator.