You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by si...@apache.org on 2004/08/04 07:28:54 UTC

svn commit: rev 35673 - spamassassin/trunk/t

Author: sidney
Date: Tue Aug  3 22:28:53 2004
New Revision: 35673

Modified:
   spamassassin/trunk/t/SATest.pm
   spamassassin/trunk/t/spamc.t
   spamassassin/trunk/t/spamc_B.t
   spamassassin/trunk/t/spamc_E.t
   spamassassin/trunk/t/spamc_c.t
   spamassassin/trunk/t/spamc_c_stdout_closed.t
   spamassassin/trunk/t/spamc_l.t
Log:
bug 3638: make test errors in Windows and bug 3639: spamc tests skipped under Windows unless started in t directory

Modified: spamassassin/trunk/t/SATest.pm
==============================================================================
--- spamassassin/trunk/t/SATest.pm	(original)
+++ spamassassin/trunk/t/SATest.pm	Tue Aug  3 22:28:53 2004
@@ -15,12 +15,9 @@
   #   <http://www.mail-archive.com/dev%40perl.apache.org/msg05466.html>
   #  -- mss, 2004-01-13
   our $RUNNING_ON_WINDOWS = ($^O =~ /^(mswin|dos|os2)/oi);
-  our $NO_SPAMC_EXE = ($RUNNING_ON_WINDOWS &&
-                       !$ENV{'SPAMC_SCRIPT'} &&
-                       !(-e "../spamc/spamc.exe"));
-  our $SKIP_SPAMC_TESTS = ($NO_SPAMC_EXE ||
-                           ($RUNNING_ON_WINDOWS && !$ENV{'SPAMD_HOST'})); 
-  our $SKIP_SPAMD_TESTS   = $RUNNING_ON_WINDOWS; 
+  our $SKIP_SPAMD_TESTS = $RUNNING_ON_WINDOWS; 
+  our $NO_SPAMC_EXE;
+  our $SKIP_SPAMC_TESTS;
   our $SSL_AVAILABLE;
 
 }
@@ -82,9 +79,15 @@
 
   (-f "t/test_dir") && chdir("t");        # run from ..
 
-  $SSL_AVAILABLE = ((`$spamd --version` =~ /with SSL support/) &&
-                    (`$spamc -V` =~ /with SSL support/));
-
+  $NO_SPAMC_EXE = ($RUNNING_ON_WINDOWS &&
+                   !$ENV{'SPAMC_SCRIPT'} &&
+                   !(-e "../spamc/spamc.exe"));
+  $SKIP_SPAMC_TESTS = ($NO_SPAMC_EXE ||
+                       ($RUNNING_ON_WINDOWS && !$ENV{'SPAMD_HOST'})); 
+  $SSL_AVAILABLE = ((!$SKIP_SPAMC_TESTS) &&  # no SSL test if no spamc
+                    (!$SKIP_SPAMD_TESTS) &&  # or if no local spamd
+                    (`$spamc -V` =~ /with SSL support/) &&
+                    (`$spamd --version` =~ /with SSL support/));
   # do not remove prior test results!
   # rmtree ("log");
 

Modified: spamassassin/trunk/t/spamc.t
==============================================================================
--- spamassassin/trunk/t/spamc.t	(original)
+++ spamassassin/trunk/t/spamc.t	Tue Aug  3 22:28:53 2004
@@ -2,7 +2,7 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc");
-use Test; BEGIN { plan tests => ($NO_SPAMC_EXE ? 0 : 2) };
+use Test; plan tests => ($NO_SPAMC_EXE ? 0 : 2);
 
 exit if $NO_SPAMC_EXE;
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/spamc_B.t
==============================================================================
--- spamassassin/trunk/t/spamc_B.t	(original)
+++ spamassassin/trunk/t/spamc_B.t	Tue Aug  3 22:28:53 2004
@@ -3,7 +3,7 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc_B");
 
-use Test; BEGIN { plan tests => ($SKIP_SPAMC_TESTS ? 0 : 8) };
+use Test; plan tests => ($SKIP_SPAMC_TESTS ? 0 : 8);
 
 exit if $SKIP_SPAMC_TESTS;
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/spamc_E.t
==============================================================================
--- spamassassin/trunk/t/spamc_E.t	(original)
+++ spamassassin/trunk/t/spamc_E.t	Tue Aug  3 22:28:53 2004
@@ -2,7 +2,7 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc_E");
-use Test; BEGIN { plan tests => ($SKIP_SPAMC_TESTS ? 0 : 2) };
+use Test; plan tests => ($SKIP_SPAMC_TESTS ? 0 : 2);
 
 exit if $SKIP_SPAMC_TESTS;
 

Modified: spamassassin/trunk/t/spamc_c.t
==============================================================================
--- spamassassin/trunk/t/spamc_c.t	(original)
+++ spamassassin/trunk/t/spamc_c.t	Tue Aug  3 22:28:53 2004
@@ -2,7 +2,7 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc_c");
-use Test; BEGIN { plan tests => ($SKIP_SPAMC_TESTS ? 0 : 2) };
+use Test; plan tests => ($SKIP_SPAMC_TESTS ? 0 : 2);
 
 exit if $SKIP_SPAMC_TESTS;
 

Modified: spamassassin/trunk/t/spamc_c_stdout_closed.t
==============================================================================
--- spamassassin/trunk/t/spamc_c_stdout_closed.t	(original)
+++ spamassassin/trunk/t/spamc_c_stdout_closed.t	Tue Aug  3 22:28:53 2004
@@ -2,7 +2,7 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc_c_stdout_closed");
-use Test; BEGIN { plan tests => ($SKIP_SPAMC_TESTS ? 0 : 2) };
+use Test; plan tests => ($SKIP_SPAMC_TESTS ? 0 : 2);
 
 exit if $SKIP_SPAMC_TESTS;
 

Modified: spamassassin/trunk/t/spamc_l.t
==============================================================================
--- spamassassin/trunk/t/spamc_l.t	(original)
+++ spamassassin/trunk/t/spamc_l.t	Tue Aug  3 22:28:53 2004
@@ -2,7 +2,7 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("spamc_l");
-use Test; BEGIN { plan tests => ($NO_SPAMC_EXE ? 0 : 3) };
+use Test; plan tests => ($NO_SPAMC_EXE ? 0 : 3);
 
 exit if $NO_SPAMC_EXE;