You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2014/02/20 20:45:48 UTC

svn commit: r1570329 - /spamassassin/trunk/t/sa_compile.t

Author: kmcgrail
Date: Thu Feb 20 19:45:47 2014
New Revision: 1570329

URL: http://svn.apache.org/r1570329
Log:
Patch from Daniel J. Luke to use Config to get path when non-standard sitebin is set

Modified:
    spamassassin/trunk/t/sa_compile.t

Modified: spamassassin/trunk/t/sa_compile.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/sa_compile.t?rev=1570329&r1=1570328&r2=1570329&view=diff
==============================================================================
--- spamassassin/trunk/t/sa_compile.t (original)
+++ spamassassin/trunk/t/sa_compile.t Thu Feb 20 19:45:47 2014
@@ -4,6 +4,10 @@ use lib '.'; use lib 't';
 $ENV{'TEST_PERL_TAINT'} = 'no';     # inhibit for this test
 use SATest; sa_t_init("sa_compile");
 use Test;
+use Config;
+
+my $temp_binpath = $Config{sitebinexp};
+$temp_binpath =~ s/^$Config{prefix}//;
 
 # called from BEGIN
 sub re2c_version_new_enough {
@@ -113,7 +117,7 @@ $INST_FROM_SCRATCH and run_makefile_pl "
 
 # we now have an "installed" version we can run sa-compile with.  Ensure
 # sarun() will use it appropriately
-$scr = "$instdir/foo/bin/spamassassin";
+$scr = "$instdir/foo/$temp_binpath/spamassassin";
 $scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
 
 set_rules q{
@@ -135,14 +139,14 @@ clear_pattern_counters();
 
 # -------------------------------------------------------------------
 
-system_or_die "$instdir/foo/bin/sa-compile --keep-tmps";  # --debug
+system_or_die "$instdir/foo/$temp_binpath/sa-compile --keep-tmps";  # --debug
 %patterns = (
 
   q{ able to use 1/1 'body_0' compiled rules }, 'able-to-use',
   q{ check: tests=FOO }, 'FOO'
 
 );
-$scr = "$instdir/foo/bin/spamassassin";
+$scr = "$instdir/foo/$temp_binpath/spamassassin";
 $scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
 ok sarun ("-D -Lt < $cwd/data/spam/001 2>&1", \&patterns_run_cb);
 ok_all_patterns();