diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-03-13 22:21:31 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-03-13 22:22:35 +0200 |
commit | 3967a43e61c59cdcbc7c71346b4b849c09d63773 (patch) | |
tree | 766741f2091795f1a89c41ca502c550c23eb3437 /tests | |
parent | d0dc3b3c972d9a0aadeb58b5833c4a53678af1be (diff) | |
download | mailfromd-3967a43e61c59cdcbc7c71346b4b849c09d63773.tar.gz mailfromd-3967a43e61c59cdcbc7c71346b4b849c09d63773.tar.bz2 |
Finish migration to Git.
* Makefile.am (dist-hook): Create ChangeLog.
(ChangeLog): New rule.
* NEWS, README-alpha, README-hacking: Update
* gnulib.modules: Add gitlog-to-changelog
* ChangeLog: Rename to ChangeLog.svn
* tests/hasmx.at, tests/hostname.at, tests/ismx.at,
tests/poll.at, tests/poll01.at, tests/poll02.at,
tests/poll03.at, tests/rescname.at, tests/resolve.at,
tests/testsuite.at: Skip tests if the network is down.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hasmx.at | 7 | ||||
-rw-r--r-- | tests/hostname.at | 15 | ||||
-rw-r--r-- | tests/ismx.at | 16 | ||||
-rw-r--r-- | tests/poll.at | 6 | ||||
-rw-r--r-- | tests/poll01.at | 6 | ||||
-rw-r--r-- | tests/poll02.at | 6 | ||||
-rw-r--r-- | tests/poll03.at | 6 | ||||
-rw-r--r-- | tests/rescname.at | 13 | ||||
-rw-r--r-- | tests/resolve.at | 11 | ||||
-rw-r--r-- | tests/testsuite.at | 2 |
10 files changed, 48 insertions, 40 deletions
diff --git a/tests/hasmx.at b/tests/hasmx.at index ace4a444..e62b57f4 100644 --- a/tests/hasmx.at +++ b/tests/hasmx.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,9 +17,10 @@ AT_SETUP([Hasmx call]) AT_KEYWORDS([dns hasmx]) +AT_CHECK([ +AT_REQUIRE_DNS cleardb - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=hasmx arg1=gnu.org.ua], +mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=hasmx arg1=gnu.org.ua], [0], [State envfrom: continue ], diff --git a/tests/hostname.at b/tests/hostname.at index 37869f3f..69010f14 100644 --- a/tests/hostname.at +++ b/tests/hostname.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,13 +17,16 @@ AT_SETUP([Resolve cname]) AT_KEYWORDS([dns rescname]) -IPADDR=`puszcza_addr` -host -tPTR $IPADDR |\ - sed -n '1s/.*\.in-addr.arpa domain name pointer \(.*\)./\1/p' > experr +if `AT_REQUIRE_DNS`; then + IPADDR=`puszcza_addr` + host -tPTR $IPADDR |\ + sed -n '1s/.*\.in-addr.arpa domain name pointer \(.*\)./\1/p' > experr +fi +AT_CHECK([ +test -f experr || AT_SKIP_TEST # Same as AT_REQUIRE_DNS cleardb - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=hostname arg1=$IPADDR], +mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=hostname arg1=$IPADDR], [0], [State envfrom: continue ], diff --git a/tests/ismx.at b/tests/ismx.at index 110c2d6f..04fadb5b 100644 --- a/tests/ismx.at +++ b/tests/ismx.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,19 +17,17 @@ AT_SETUP([Ismx call]) AT_KEYWORDS([dns ismx]) +AT_CHECK([ +AT_REQUIRE_DNS cleardb - -host -tMX gnu.org.ua | - sed 's/gnu.org.ua mail is handled by [[0-9]][[0-9]]* \(.*\)\./\1/' | - while read name - do - AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=ismx arg1=gnu.org.ua arg2=$name], - [0], +name=`host -tMX gnu.org.ua | sed 's/gnu.org.ua mail is handled by [[0-9]][[0-9]]* \(.*\)\./\1/' | head -n 1` +mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=ismx arg1=gnu.org.ua arg2=$name +], +[0], [State envfrom: continue ], [1 ]) - done AT_CLEANUP diff --git a/tests/poll.at b/tests/poll.at index bad4a21d..a202cd8b 100644 --- a/tests/poll.at +++ b/tests/poll.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,9 +17,9 @@ AT_SETUP([poll: Existing sender]) AT_KEYWORDS([poll exist poll00]) +AT_CHECK([ AT_REQUIRE_DNS - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/poll.rc \ +mailfromd $MFOPTS --test $ETCDIR/poll.rc \ f=gray+mailfromd-test@gnu.org.ua client_addr=relay1.gnu.org.ua], [0], [State envfrom: accept diff --git a/tests/poll01.at b/tests/poll01.at index 578c020e..9a7853d6 100644 --- a/tests/poll01.at +++ b/tests/poll01.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,9 +17,9 @@ AT_SETUP([poll: Non-existing sender]) AT_KEYWORDS([poll non-exist poll01]) +AT_CHECK([ AT_REQUIRE_DNS - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/poll.rc \ +mailfromd $MFOPTS --test $ETCDIR/poll.rc \ f=nonexisting+mailfromd-test@gnu.org.ua client_addr=relay1.gnu.org.ua], [0], [SET REPLY 550 5.1.0 Sender validity not confirmed diff --git a/tests/poll02.at b/tests/poll02.at index d4a10e61..085b24ed 100644 --- a/tests/poll02.at +++ b/tests/poll02.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,9 +17,9 @@ AT_SETUP([poll: Tempfail]) AT_KEYWORDS([poll tempfail poll02]) +AT_CHECK([ AT_REQUIRE_DNS - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/poll.rc \ +mailfromd $MFOPTS --test $ETCDIR/poll.rc \ f=tempfail+mailfromd-test client_addr=relay1.gnu.org.ua], [0], [SET REPLY 450 4.1.0 Try again later diff --git a/tests/poll03.at b/tests/poll03.at index 72aa2be0..4c655271 100644 --- a/tests/poll03.at +++ b/tests/poll03.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,9 +17,9 @@ AT_SETUP([poll: Multiple from addresses]) AT_KEYWORDS([poll multiple poll03]) +AT_CHECK([ AT_REQUIRE_DNS - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/poll-1.rc \ +mailfromd $MFOPTS --test $ETCDIR/poll-1.rc \ f=gray+mailfromd-test@gnu.org.ua client_addr=relay1.gnu.org.ua], [0], [State envfrom: accept diff --git a/tests/rescname.at b/tests/rescname.at index 405197c2..28d56fb6 100644 --- a/tests/rescname.at +++ b/tests/rescname.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,14 +14,17 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -AT_SETUP([Resolve cname ]) +AT_SETUP([Resolve cname]) AT_KEYWORDS([dns rescname]) -puszcza_addr > experr +if `AT_REQUIRE_DNS`; then + puszcza_addr > experr +fi +AT_CHECK([ +test -f experr || AT_SKIP_TEST # Same as AT_REQUIRE_DNS cleardb - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=resolve arg1=ps.gnu.org.ua], +mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=resolve arg1=ps.gnu.org.ua], [0], [State envfrom: continue ], diff --git a/tests/resolve.at b/tests/resolve.at index 6c97598f..ab3f0c92 100644 --- a/tests/resolve.at +++ b/tests/resolve.at @@ -1,5 +1,5 @@ # This file is part of Mailfromd testsuite. -*- Autotest -*- -# Copyright (C) 2007, 2008 Sergey Poznyakoff +# Copyright (C) 2007, 2008, 2009 Sergey Poznyakoff # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,11 +17,14 @@ AT_SETUP([Resolve]) AT_KEYWORDS([dns resolve]) -puszcza_addr > experr +if `AT_REQUIRE_DNS`; then + puszcza_addr > experr +fi +AT_CHECK([ +test -f experr || AT_SKIP_TEST # same as AT_REQUIRE_DNS cleardb - -AT_CHECK([mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=resolve arg1=puszcza.gnu.org.ua], +mailfromd $MFOPTS --test $ETCDIR/dns.rc mode=resolve arg1=puszcza.gnu.org.ua], [0], [State envfrom: continue ], diff --git a/tests/testsuite.at b/tests/testsuite.at index 28050298..c70a95c1 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -51,7 +51,7 @@ test $result -eq 0 && AT_SKIP_TEST ]) m4_define([AT_REQUIRE_DNS], - [host puszcza.gnu.org.ua || AT_SKIP_TEST]) + [host puszcza.gnu.org.ua > /dev/null 2>&1 || AT_SKIP_TEST]) dnl MF_CHECK_TEXT(TEXT,[ARGS], [STATUS],[STDOUT],[STDERR],[RUN-IF-FAIL], [RUN-IF-PASS]) |