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 2005/05/17 05:35:23 UTC

svn commit: r170509 - in /spamassassin/trunk/t: spamc_optL.t whitelist_addrs.t

Author: jm
Date: Mon May 16 20:35:22 2005
New Revision: 170509

URL: http://svn.apache.org/viewcvs?rev=170509&view=rev
Log:
bug 4333: resolve test failures on Solaris 10, both caused by the lack of the optional module DB_File

Modified:
    spamassassin/trunk/t/spamc_optL.t
    spamassassin/trunk/t/whitelist_addrs.t

Modified: spamassassin/trunk/t/spamc_optL.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/spamc_optL.t?rev=170509&r1=170508&r2=170509&view=diff
==============================================================================
--- spamassassin/trunk/t/spamc_optL.t (original)
+++ spamassassin/trunk/t/spamc_optL.t Mon May 16 20:35:22 2005
@@ -2,11 +2,17 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc_optL");
-use Test; plan tests => ($SKIP_SPAMC_TESTS ? 0 : 16);
+use constant HAS_SDBM_FILE => eval { require SDBM_File; };
 
-exit if $SKIP_SPAMC_TESTS;
+use Test; plan tests => (!HAS_SDBM_FILE || $SKIP_SPAMC_TESTS ? 0 : 16);
+
+exit if (!HAS_SDBM_FILE || $SKIP_SPAMC_TESTS);
 
 # ---------------------------------------------------------------------------
+
+tstlocalrules ("
+        bayes_store_module Mail::SpamAssassin::BayesStore::SDBM
+");
 
 start_spamd("-L");
 

Modified: spamassassin/trunk/t/whitelist_addrs.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/whitelist_addrs.t?rev=170509&r1=170508&r2=170509&view=diff
==============================================================================
--- spamassassin/trunk/t/whitelist_addrs.t (original)
+++ spamassassin/trunk/t/whitelist_addrs.t Mon May 16 20:35:22 2005
@@ -2,7 +2,11 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("whitelist_addrs");
-use Test; BEGIN { plan tests => 5 };
+
+use constant HAS_DB_FILE => eval { require DB_File; };
+
+use Test; BEGIN { plan tests => (HAS_DB_FILE ? 5 : 0); };
+exit unless HAS_DB_FILE;
 
 # ---------------------------------------------------------------------------
 



Re: svn commit: r170509 - in /spamassassin/trunk/t: spamc_optL.t whitelist_addrs.t

Posted by Michael Parker <pa...@pobox.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jm@apache.org wrote:
> 
> Modified: spamassassin/trunk/t/whitelist_addrs.t
> URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/whitelist_addrs.t?rev=170509&r1=170508&r2=170509&view=diff
> ==============================================================================
> --- spamassassin/trunk/t/whitelist_addrs.t (original)
> +++ spamassassin/trunk/t/whitelist_addrs.t Mon May 16 20:35:22 2005
> @@ -2,7 +2,11 @@
>  
>  use lib '.'; use lib 't';
>  use SATest; sa_t_init("whitelist_addrs");
> -use Test; BEGIN { plan tests => 5 };
> +
> +use constant HAS_DB_FILE => eval { require DB_File; };
> +
> +use Test; BEGIN { plan tests => (HAS_DB_FILE ? 5 : 0); };
> +exit unless HAS_DB_FILE;
>  

I think this is too broad, AWL should work with multiple different db
modules, SDBM_File is in the list of usable ones.  I think the better
fix would be to figure out why it isn't picking that up and using it.

- -1 for this change, it's unnecessary.

Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCigQXG4km+uS4gOIRAk3gAJ9lO6HfIs/pOXQEELX10zefx71inwCdHkWD
ZZ/CRCsS6u1adbyXEhQSSGQ=
=JaUq
-----END PGP SIGNATURE-----