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 2007/01/08 23:02:44 UTC

svn commit: r494216 - /spamassassin/trunk/t/tainted_msg.t

Author: jm
Date: Mon Jan  8 14:02:43 2007
New Revision: 494216

URL: http://svn.apache.org/viewvc?view=rev&rev=494216
Log:
hmm, workaround test failures, presumably from buildbot not using taint mode

Modified:
    spamassassin/trunk/t/tainted_msg.t

Modified: spamassassin/trunk/t/tainted_msg.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/tainted_msg.t?view=diff&rev=494216&r1=494215&r2=494216
==============================================================================
--- spamassassin/trunk/t/tainted_msg.t (original)
+++ spamassassin/trunk/t/tainted_msg.t Mon Jan  8 14:02:43 2007
@@ -1,8 +1,23 @@
 #!/usr/bin/perl
 
+BEGIN {
+  if (-e 't/test_dir') { # if we are running "t/rule_tests.t", kluge around ...
+    chdir 't';
+  }
+
+  if (-e 'test_dir') {            # running from test directory, not ..
+    unshift(@INC, '../blib/lib');
+    unshift(@INC, '../lib');
+  }
+}
+
 use lib '.'; use lib 't';
 use SATest; sa_t_init("tainted_msg");
-use Test; BEGIN { plan tests => 8 };
+
+use Mail::SpamAssassin::Util;
+use constant AM_TAINTED => Mail::SpamAssassin::Util::am_running_in_taint_mode();
+
+use Test; BEGIN { plan tests => AM_TAINTED ? 8 : 0 };
 
 # ---------------------------------------------------------------------------