You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2013/01/04 18:54:20 UTC
svn commit: r1429002 - /spamassassin/trunk/t/spf.t
Author: mmartinec
Date: Fri Jan 4 17:54:20 2013
New Revision: 1429002
URL: http://svn.apache.org/viewvc?rev=1429002&view=rev
Log:
t/spf.t - make disabling of this test more selective: if Sys::Hostname::Long does not exists that is just fine
Modified:
spamassassin/trunk/t/spf.t
Modified: spamassassin/trunk/t/spf.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spf.t?rev=1429002&r1=1429001&r2=1429002&view=diff
==============================================================================
--- spamassassin/trunk/t/spf.t (original)
+++ spamassassin/trunk/t/spf.t Fri Jan 4 17:54:20 2013
@@ -10,16 +10,17 @@ use constant HAS_MAILSPF => eval { requi
# bug 3806:
# Do not run this test with version of Sys::Hostname::Long older than 1.4
# on non-Linux unices as root, due to a bug in Sys::Hostname::Long
-# (which is used by Net::DNS and by Mail::SPF::Query)
+# (it is used by Mail::SPF::Query, which is now obsoleted by Mail::SPF)
use constant IS_LINUX => $^O eq 'linux';
use constant IS_WINDOWS => ($^O =~ /^(mswin|dos|os2)/oi);
use constant AM_ROOT => $< == 0;
-use constant HAS_SAFE_HOSTNAME =>
- eval { require Sys::Hostname::Long; Sys::Hostname::Long->VERSION(1.4) };
+
+use constant HAS_UNSAFE_HOSTNAME => # Bug 3806 - module exists and is old
+ eval { require Sys::Hostname::Long && Sys::Hostname::Long->VERSION < 1.4 };
use constant DO_RUN =>
TEST_ENABLED && (HAS_SPFQUERY || HAS_MAILSPF) &&
- (HAS_SAFE_HOSTNAME || !AM_ROOT || IS_LINUX || IS_WINDOWS);
+ (!HAS_UNSAFE_HOSTNAME || !AM_ROOT || IS_LINUX || IS_WINDOWS);
BEGIN {