You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/10/13 02:35:17 UTC

svn commit: rev 54711 - spamassassin/trunk/t

Author: jm
Date: Tue Oct 12 17:35:16 2004
New Revision: 54711

Modified:
   spamassassin/trunk/t/dnsbl.t
Log:
duh, typo; HAS_NET_DNS not HAS_SPFQUERY

Modified: spamassassin/trunk/t/dnsbl.t
==============================================================================
--- spamassassin/trunk/t/dnsbl.t	(original)
+++ spamassassin/trunk/t/dnsbl.t	Tue Oct 12 17:35:16 2004
@@ -5,14 +5,22 @@
 
 use constant TEST_ENABLED => (-e 't/do_net' || -e 'do_net');
 use constant HAS_NET_DNS => eval { require Net::DNS; };
+# Do not run this test on non-Linux unices as root, due to a bug
+# in Sys::Hostname::Long (which Net::DNS uses.)
+# See <http://bugzilla.spamassassin.org/show_bug.cgi?id=3806>
+use constant IS_LINUX   => $^O eq 'linux';
+use constant AM_ROOT    => $< == 0;
+
+use constant DO_RUN     => TEST_ENABLED && HAS_NET_DNS &&
+                                        !(AM_ROOT && !IS_LINUX);
 
 use Test;
 
 BEGIN {
-  plan tests => ((TEST_ENABLED && HAS_NET_DNS) ? 22 : 0),
+  plan tests => (DO_RUN ? 22 : 0),
 };
 
-exit unless (TEST_ENABLED && HAS_NET_DNS);
+exit unless (DO_RUN);
 
 # ---------------------------------------------------------------------------
 # bind configuration currently used to support this test