spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r685932 - in /spamassassin/trunk: build/hudson/ t/
Date Thu, 14 Aug 2008 14:57:25 GMT
Author: jm
Date: Thu Aug 14 07:57:23 2008
New Revision: 685932

URL: http://svn.apache.org/viewvc?rev=685932&view=rev
Log:
bug 4131: speed up default 'make test' from 20 minutes, to just over 4, by not running the
really slow tests by default. developers should edit t/config and set run_long_tests=y

Modified:
    spamassassin/trunk/build/hudson/run_build
    spamassassin/trunk/t/bayesdbm.t
    spamassassin/trunk/t/bayesdbm_flock.t
    spamassassin/trunk/t/bayessdbm.t
    spamassassin/trunk/t/bayessdbm_seen_delete.t
    spamassassin/trunk/t/config.dist
    spamassassin/trunk/t/db_based_whitelist.t
    spamassassin/trunk/t/db_based_whitelist_ips.t
    spamassassin/trunk/t/debug.t
    spamassassin/trunk/t/dnsbl.t
    spamassassin/trunk/t/lang_lint.t
    spamassassin/trunk/t/line_endings.t
    spamassassin/trunk/t/spamc_x_E_R.t
    spamassassin/trunk/t/spamd_client.t
    spamassassin/trunk/t/spamd_hup.t
    spamassassin/trunk/t/spamd_kill_restart.t
    spamassassin/trunk/t/spamd_kill_restart_rr.t
    spamassassin/trunk/t/spamd_prefork_stress.t
    spamassassin/trunk/t/spamd_prefork_stress_2.t
    spamassassin/trunk/t/spamd_prefork_stress_3.t
    spamassassin/trunk/t/spamd_prefork_stress_4.t
    spamassassin/trunk/t/spf.t
    spamassassin/trunk/t/strip2.t
    spamassassin/trunk/t/strip_no_subject.t
    spamassassin/trunk/t/trust_path.t
    spamassassin/trunk/t/uribl.t
    spamassassin/trunk/t/whitelist_addrs.t
    spamassassin/trunk/t/whitelist_from.t

Modified: spamassassin/trunk/build/hudson/run_build
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/hudson/run_build?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/build/hudson/run_build (original)
+++ spamassassin/trunk/build/hudson/run_build Thu Aug 14 07:57:23 2008
@@ -11,6 +11,13 @@
 make
 make distcheck
 
+# select the tests we want
+echo "
+run_spamd_prefork_stress_test=y
+run_net_tests=y
+run_long_tests=y
+" > t/config
+
 # generate 't/log.make_test'
 make test TEST_VERBOSE=1 \
     2>&1 | tee artifacts/make_test.log

Modified: spamassassin/trunk/t/bayesdbm.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/bayesdbm.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/bayesdbm.t (original)
+++ spamassassin/trunk/t/bayesdbm.t Thu Aug 14 07:57:23 2008
@@ -5,7 +5,8 @@
 use SATest; sa_t_init("bayes");
 use Test;
 
-use constant HAS_DB_FILE => eval { require DB_File; };
+use constant TEST_ENABLED => conf_bool('run_long_tests') &&
+                            eval { require DB_File; };
 
 BEGIN { 
   if (-e 't/test_dir') {
@@ -16,10 +17,10 @@
     unshift(@INC, '../blib/lib');
   }
 
-  plan tests => (HAS_DB_FILE ? 48 : 0);
+  plan tests => (TEST_ENABLED ? 48 : 0);
 };
 
-exit unless HAS_DB_FILE;
+exit unless TEST_ENABLED;
 
 tstlocalrules ("
         bayes_learn_to_journal 0

Modified: spamassassin/trunk/t/bayesdbm_flock.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/bayesdbm_flock.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/bayesdbm_flock.t (original)
+++ spamassassin/trunk/t/bayesdbm_flock.t Thu Aug 14 07:57:23 2008
@@ -5,7 +5,8 @@
 use SATest; sa_t_init("bayesdbm_flock");
 use Test;
 
-use constant HAS_DB_FILE => eval { require DB_File; };
+use constant TEST_ENABLED => conf_bool('run_long_tests') &&
+                        eval { require DB_File; };
 
 BEGIN { 
   if (-e 't/test_dir') {
@@ -16,10 +17,10 @@
     unshift(@INC, '../blib/lib');
   }
 
-  plan tests => ((HAS_DB_FILE && !$RUNNING_ON_WINDOWS) ? 48 : 0);
+  plan tests => ((TEST_ENABLED && !$RUNNING_ON_WINDOWS) ? 48 : 0);
 };
 
-exit unless (HAS_DB_FILE && !$RUNNING_ON_WINDOWS);
+exit unless (TEST_ENABLED && !$RUNNING_ON_WINDOWS);
 
 tstlocalrules ("
         bayes_learn_to_journal 0

Modified: spamassassin/trunk/t/bayessdbm.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/bayessdbm.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/bayessdbm.t (original)
+++ spamassassin/trunk/t/bayessdbm.t Thu Aug 14 07:57:23 2008
@@ -5,7 +5,8 @@
 use SATest; sa_t_init("bayes");
 use Test;
 
-use constant HAS_SDBM_FILE => eval { require SDBM_File; };
+use constant TEST_ENABLED => conf_bool('run_long_tests') &&
+                            eval { require SDBM_File; };
 
 BEGIN { 
   if (-e 't/test_dir') {
@@ -16,10 +17,10 @@
     unshift(@INC, '../blib/lib');
   }
 
-  plan tests => (HAS_SDBM_FILE ? 52 : 0);
+  plan tests => (TEST_ENABLED ? 52 : 0);
 };
 
-exit unless HAS_SDBM_FILE;
+exit unless TEST_ENABLED;
 
 tstlocalrules ("
         bayes_store_module Mail::SpamAssassin::BayesStore::SDBM

Modified: spamassassin/trunk/t/bayessdbm_seen_delete.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/bayessdbm_seen_delete.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/bayessdbm_seen_delete.t (original)
+++ spamassassin/trunk/t/bayessdbm_seen_delete.t Thu Aug 14 07:57:23 2008
@@ -5,7 +5,8 @@
 use SATest; sa_t_init("bayessdbm_seen_delete");
 use Test;
 
-use constant HAS_SDBM_FILE => eval { require SDBM_File; };
+use constant TEST_ENABLED => conf_bool('run_long_tests') &&
+                    eval { require SDBM_File; };
 
 BEGIN { 
   if (-e 't/test_dir') {
@@ -16,10 +17,10 @@
     unshift(@INC, '../blib/lib');
   }
 
-  plan tests => (HAS_SDBM_FILE ? 54 : 0);
+  plan tests => (TEST_ENABLED ? 54 : 0);
 };
 
-exit unless HAS_SDBM_FILE;
+exit unless TEST_ENABLED;
 
 tstlocalrules ("
         bayes_store_module Mail::SpamAssassin::BayesStore::SDBM

Modified: spamassassin/trunk/t/config.dist
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/config.dist?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/config.dist (original)
+++ spamassassin/trunk/t/config.dist Thu Aug 14 07:57:23 2008
@@ -2,6 +2,12 @@
 # Please copy this file to 'config' and edit to your taste.
 
 # ---------------------------------------------------------------------------
+# Run time-consuming tests during 'make test'.  (These tests take longer
+# than 10 seconds each on a reasonably fast box.)
+
+run_long_tests=n
+
+# ---------------------------------------------------------------------------
 # Run network rule tests during 'make test'.
 # test scripts may fail due to network problems)
 
@@ -10,7 +16,6 @@
 # Run DCC Tests
 run_dcc_tests=n
 
-
 # ---------------------------------------------------------------------------
 # Run SQL-based user pref tests during 'make test' REQUIRES DBD::SQLite
 run_sql_pref_tests=n

Modified: spamassassin/trunk/t/db_based_whitelist.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/db_based_whitelist.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/db_based_whitelist.t (original)
+++ spamassassin/trunk/t/db_based_whitelist.t Thu Aug 14 07:57:23 2008
@@ -1,8 +1,15 @@
 #!/usr/bin/perl
 
 use lib '.'; use lib 't';
+
 use SATest; sa_t_init("db_based_whitelist");
-use Test; BEGIN { plan tests => 8 };
+use Test;
+
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+BEGIN { 
+  plan tests => (TEST_ENABLED ? 8 : 0);
+};
+exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------
 

Modified: spamassassin/trunk/t/db_based_whitelist_ips.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/db_based_whitelist_ips.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/db_based_whitelist_ips.t (original)
+++ spamassassin/trunk/t/db_based_whitelist_ips.t Thu Aug 14 07:57:23 2008
@@ -1,8 +1,15 @@
 #!/usr/bin/perl
 
 use lib '.'; use lib 't';
+
 use SATest; sa_t_init("db_based_whitelist_ips");
-use Test; BEGIN { plan tests => 8 };
+use Test;
+
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+BEGIN { 
+  plan tests => (TEST_ENABLED ? 8 : 0);
+};
+exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------
 

Modified: spamassassin/trunk/t/debug.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/debug.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/debug.t (original)
+++ spamassassin/trunk/t/debug.t Thu Aug 14 07:57:23 2008
@@ -20,7 +20,12 @@
 use Test;
 use Mail::SpamAssassin;
 
-plan tests => 3;
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+
+BEGIN { 
+  plan tests => (TEST_ENABLED ? 3 : 0);
+};
+exit unless TEST_ENABLED;
 
 # list of known debug facilities
 my %facility = map {; $_ => 1 }

Modified: spamassassin/trunk/t/dnsbl.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/dnsbl.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/dnsbl.t (original)
+++ spamassassin/trunk/t/dnsbl.t Thu Aug 14 07:57:23 2008
@@ -3,7 +3,7 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("dns");
 
-use constant TEST_ENABLED => conf_bool('run_net_tests');
+use constant TEST_ENABLED => conf_bool('run_net_tests') && conf_bool('run_long_tests');
 use constant HAS_NET_DNS => eval { require Net::DNS; };
 # bug 3806:
 # Do not run this test with version of Sys::Hostname::Long older than 1.4

Modified: spamassassin/trunk/t/lang_lint.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/lang_lint.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/lang_lint.t (original)
+++ spamassassin/trunk/t/lang_lint.t Thu Aug 14 07:57:23 2008
@@ -3,8 +3,14 @@
 use lib '.'; use lib 't';
 use vars qw(@locales);
 use SATest; sa_t_init("lang_lint");
-use Test; BEGIN { @locales = qw( de es fr it nl pl pl pt_BR );
-                  plan tests => scalar @locales };
+
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+
+use Test; BEGIN {
+  @locales = qw( de es fr it nl pl pl pt_BR );
+  plan tests => (TEST_ENABLED ? scalar(@locales) : 0);
+};
+exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------
 

Modified: spamassassin/trunk/t/line_endings.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/line_endings.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/line_endings.t (original)
+++ spamassassin/trunk/t/line_endings.t Thu Aug 14 07:57:23 2008
@@ -2,7 +2,13 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("line_endings");
-use Test; BEGIN { plan tests => 26 };
+
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+
+use Test; BEGIN {
+  plan tests => (TEST_ENABLED ? 26 : 0);
+};
+exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------
 

Modified: spamassassin/trunk/t/spamc_x_E_R.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamc_x_E_R.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamc_x_E_R.t (original)
+++ spamassassin/trunk/t/spamc_x_E_R.t Thu Aug 14 07:57:23 2008
@@ -3,10 +3,10 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc_x_E_R");
 
-our $DO_RUN = !$SKIP_SPAMD_TESTS;
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+our $DO_RUN = !$SKIP_SPAMD_TESTS && TEST_ENABLED;
 
 use Test; plan tests => ($DO_RUN ? 49 : 0);
-
 exit unless $DO_RUN;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/spamd_client.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_client.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_client.t (original)
+++ spamassassin/trunk/t/spamd_client.t Thu Aug 14 07:57:23 2008
@@ -18,9 +18,11 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamd_client");
+
+use constant TEST_ENABLED => conf_bool('run_long_tests');
 use constant HAS_SDBM_FILE => eval { require SDBM_File; };
 
-our $DO_RUN = !$SKIP_SPAMD_TESTS;
+our $DO_RUN = !$SKIP_SPAMD_TESTS && TEST_ENABLED;
 
 my $num_tests = 18;
 

Modified: spamassassin/trunk/t/spamd_hup.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_hup.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_hup.t (original)
+++ spamassassin/trunk/t/spamd_hup.t Thu Aug 14 07:57:23 2008
@@ -2,12 +2,12 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamd_hup");
-use constant TEST_ENABLED => !$SKIP_SPAMD_TESTS && !$RUNNING_ON_WINDOWS;
-
-use Test; BEGIN { plan tests => (TEST_ENABLED? 110 : 0) };
-
 use File::Spec;
 
+use constant TEST_ENABLED => conf_bool('run_long_tests') &&
+                                !$SKIP_SPAMD_TESTS && !$RUNNING_ON_WINDOWS;
+
+use Test; BEGIN { plan tests => (TEST_ENABLED ? 110 : 0) };
 exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/spamd_kill_restart.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_kill_restart.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_kill_restart.t (original)
+++ spamassassin/trunk/t/spamd_kill_restart.t Thu Aug 14 07:57:23 2008
@@ -2,7 +2,9 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamd_kill_restart");
-use constant TEST_ENABLED => !$SKIP_SPAMD_TESTS && !$RUNNING_ON_WINDOWS;
+
+use constant TEST_ENABLED => conf_bool('run_long_tests') &&
+                                !$SKIP_SPAMD_TESTS && !$RUNNING_ON_WINDOWS;
 
 use Test; BEGIN { plan tests => (TEST_ENABLED? 93 : 0) };
 

Modified: spamassassin/trunk/t/spamd_kill_restart_rr.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_kill_restart_rr.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_kill_restart_rr.t (original)
+++ spamassassin/trunk/t/spamd_kill_restart_rr.t Thu Aug 14 07:57:23 2008
@@ -2,7 +2,9 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamd_kill_restart_rr");
-use constant TEST_ENABLED => !$SKIP_SPAMD_TESTS && !$RUNNING_ON_WINDOWS;
+
+use constant TEST_ENABLED => conf_bool('run_long_tests') &&
+                                !$SKIP_SPAMD_TESTS && !$RUNNING_ON_WINDOWS;
 
 use Test; BEGIN { plan tests => (TEST_ENABLED? 93 : 0) };
 

Modified: spamassassin/trunk/t/spamd_prefork_stress.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_prefork_stress.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_prefork_stress.t (original)
+++ spamassassin/trunk/t/spamd_prefork_stress.t Thu Aug 14 07:57:23 2008
@@ -7,6 +7,7 @@
 use SATest; sa_t_init("spamd_prefork_stress");
 use Test;
 
+use constant TEST_ENABLED => conf_bool('run_long_tests');
 our $RUN_THIS_TEST;
 
 my $pgrep;
@@ -14,7 +15,7 @@
 
 # require pkill and pgrep be installed to run this test
 BEGIN {
-  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test');
+  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test') && TEST_ENABLED;
   $pkill = locate_command("pkill");
   $pgrep = locate_command("pgrep");
   $RUN_THIS_TEST = 0 if !$pkill || !$pgrep;
@@ -23,8 +24,8 @@
 
 exit if $SKIP_SPAMD_TESTS;
 
-print "NOTE: this test requires /usr/bin/pkill, /usr/bin/pgrep, and\n".
-    "'run_spamd_prefork_stress_test' set to 'y'.\n";
+print "NOTE: this test requires /usr/bin/pkill, /usr/bin/pgrep, and both\n".
+    "'run_spamd_prefork_stress_test' and 'run_long_tests' set to 'y'.\n";
 exit unless $RUN_THIS_TEST;
 
 system($pgrep, "spamd child");

Modified: spamassassin/trunk/t/spamd_prefork_stress_2.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_prefork_stress_2.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_prefork_stress_2.t (original)
+++ spamassassin/trunk/t/spamd_prefork_stress_2.t Thu Aug 14 07:57:23 2008
@@ -7,6 +7,7 @@
 use SATest; sa_t_init("spamd_prefork_stress_2");
 use Test;
 
+use constant TEST_ENABLED => conf_bool('run_long_tests');
 our $RUN_THIS_TEST;
 
 my $pgrep;
@@ -14,17 +15,17 @@
 
 # require pkill and pgrep be installed to run this test
 BEGIN {
-  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test');
+  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test') && TEST_ENABLED;
   $pkill = locate_command("pkill");
   $pgrep = locate_command("pgrep");
   $RUN_THIS_TEST = 0 if !$pkill || !$pgrep;
-  plan tests => ($SKIP_SPAMD_TESTS || !$RUN_THIS_TEST ? 0 : 14) 
+  plan tests => ($SKIP_SPAMD_TESTS || !$RUN_THIS_TEST ? 0 : 14)
 };
 
 exit if $SKIP_SPAMD_TESTS;
 
-print "NOTE: this test requires /usr/bin/pkill, /usr/bin/pgrep, and\n".
-    "'run_spamd_prefork_stress_test' set to 'y'.\n";
+print "NOTE: this test requires /usr/bin/pkill, /usr/bin/pgrep, and both\n".
+    "'run_spamd_prefork_stress_test' and 'run_long_tests' set to 'y'.\n";
 exit unless $RUN_THIS_TEST;
 
 system($pgrep, "spamd child");

Modified: spamassassin/trunk/t/spamd_prefork_stress_3.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_prefork_stress_3.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_prefork_stress_3.t (original)
+++ spamassassin/trunk/t/spamd_prefork_stress_3.t Thu Aug 14 07:57:23 2008
@@ -5,15 +5,15 @@
 use Test;
 
 our $RUN_THIS_TEST;
-
 BEGIN {
-  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test');
+  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test') &&
+                        conf_bool('run_long_tests');
   plan tests => ($SKIP_SPAMD_TESTS || !$RUN_THIS_TEST ? 0 : 291)
 };
-
 exit if $SKIP_SPAMD_TESTS;
 
-print "NOTE: this test requires 'run_spamd_prefork_stress_test' set to 'y'.\n";
+print "NOTE: this test requires both 'run_spamd_prefork_stress_test'\n".
+    "and 'run_long_tests' set to 'y'.\n";
 exit unless $RUN_THIS_TEST;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/spamd_prefork_stress_4.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spamd_prefork_stress_4.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spamd_prefork_stress_4.t (original)
+++ spamassassin/trunk/t/spamd_prefork_stress_4.t Thu Aug 14 07:57:23 2008
@@ -5,15 +5,15 @@
 use Test;
 
 our $RUN_THIS_TEST;
-
 BEGIN {
-  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test');
+  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test') &&
+                        conf_bool('run_long_tests');
   plan tests => ($SKIP_SPAMD_TESTS || !$RUN_THIS_TEST ? 0 : 43)
 };
-
 exit if $SKIP_SPAMD_TESTS;
 
-print "NOTE: this test requires 'run_spamd_prefork_stress_test' set to 'y'.\n";
+print "NOTE: this test requires both 'run_spamd_prefork_stress_test'\n".
+    "and 'run_long_tests' set to 'y'.\n";
 exit unless $RUN_THIS_TEST;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/spf.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spf.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/spf.t (original)
+++ spamassassin/trunk/t/spf.t Thu Aug 14 07:57:23 2008
@@ -4,7 +4,7 @@
 use SATest; sa_t_init("spf");
 use Test;
 
-use constant TEST_ENABLED => conf_bool('run_net_tests');
+use constant TEST_ENABLED => conf_bool('run_long_tests') && conf_bool('run_net_tests');
 use constant HAS_SPFQUERY => eval { require Mail::SPF::Query; };
 use constant HAS_MAILSPF => eval { require Mail::SPF; };
 # bug 3806:

Modified: spamassassin/trunk/t/strip2.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/strip2.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/strip2.t (original)
+++ spamassassin/trunk/t/strip2.t Thu Aug 14 07:57:23 2008
@@ -4,6 +4,11 @@
 use SATest; sa_t_init("strip2");
 use Test;
 
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+
+BEGIN { plan tests => TEST_ENABLED ? 98 : 0 };
+exit unless TEST_ENABLED;
+
 # ---------------------------------------------------------------------------
 
 use File::Copy;
@@ -22,8 +27,6 @@
 	);
 my $input;
 
-plan tests => 98;
-
 # Make sure all the files can do "report_safe 0" and "report_safe 1"
 foreach $input (@files) {
   tstprefs ("

Modified: spamassassin/trunk/t/strip_no_subject.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/strip_no_subject.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/strip_no_subject.t (original)
+++ spamassassin/trunk/t/strip_no_subject.t Thu Aug 14 07:57:23 2008
@@ -2,7 +2,12 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("strip_no_subject");
-use Test; BEGIN { plan tests => 4 };
+use Test;
+
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+
+BEGIN { plan tests => TEST_ENABLED ? 4 : 0 };
+exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------
 

Modified: spamassassin/trunk/t/trust_path.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/trust_path.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/trust_path.t (original)
+++ spamassassin/trunk/t/trust_path.t Thu Aug 14 07:57:23 2008
@@ -18,9 +18,14 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("trust_path");
-use Test; BEGIN { plan tests => 96 };
-use IO::File;
 
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+use Test;
+
+BEGIN { plan tests => TEST_ENABLED ? 96 : 0 };
+exit unless TEST_ENABLED;
+
+use IO::File;
 use strict;
 
 # make a _copy_ of the STDERR file descriptor

Modified: spamassassin/trunk/t/uribl.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/uribl.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/uribl.t (original)
+++ spamassassin/trunk/t/uribl.t Thu Aug 14 07:57:23 2008
@@ -3,7 +3,7 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("uribl");
 
-use constant TEST_ENABLED => conf_bool('run_net_tests');
+use constant TEST_ENABLED => conf_bool('run_net_tests') && conf_bool('run_long_tests');
 use constant HAS_NET_DNS => eval { require Net::DNS; };
 # bug 3806:
 # Do not run this test with version of Sys::Hostname::Long older than 1.4

Modified: spamassassin/trunk/t/whitelist_addrs.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/whitelist_addrs.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/whitelist_addrs.t (original)
+++ spamassassin/trunk/t/whitelist_addrs.t Thu Aug 14 07:57:23 2008
@@ -3,7 +3,11 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("whitelist_addrs");
 
-use Test; BEGIN { plan tests => 5; }
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+
+use Test;
+BEGIN { plan tests => TEST_ENABLED ? 5 : 0 };
+exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------
 

Modified: spamassassin/trunk/t/whitelist_from.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/whitelist_from.t?rev=685932&r1=685931&r2=685932&view=diff
==============================================================================
--- spamassassin/trunk/t/whitelist_from.t (original)
+++ spamassassin/trunk/t/whitelist_from.t Thu Aug 14 07:57:23 2008
@@ -2,7 +2,12 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("whitelist_from");
-use Test; BEGIN { plan tests => 32 };
+
+use constant TEST_ENABLED => conf_bool('run_long_tests');
+
+use Test;
+BEGIN { plan tests => TEST_ENABLED ? 32 : 0 };
+exit unless TEST_ENABLED;
 
 # ---------------------------------------------------------------------------
 



Mime
View raw message