View | Details | Raw Unified | Return to bug 7188
Collapse All | Expand All

(-)sa_compile.t-341 (-7 / +7 lines)
Lines 79-85 Link Here
79
  my $rules = shift;
79
  my $rules = shift;
80
80
81
  #Create the dir for the cf file
81
  #Create the dir for the cf file
82
  my $file = "$instdir/foo/share/spamassassin/20_testrules.cf";
82
  my $file = "$instdir/share/spamassassin/20_testrules.cf";
83
  my $dir = dirname($file);
83
  my $dir = dirname($file);
84
  mkpath($dir);
84
  mkpath($dir);
85
85
Lines 95-101 Link Here
95
  close RULES or die;
95
  close RULES or die;
96
96
97
  #Create the dir for the pre file
97
  #Create the dir for the pre file
98
  $file = "$instdir/foo/etc/mail/spamassassin/v330.pre";
98
  $file = "$instdir/etc/mail/spamassassin/v330.pre";
99
  $dir = dirname($file);
99
  $dir = dirname($file);
100
  mkpath($dir);
100
  mkpath($dir);
101
101
Lines 126-136 Link Here
126
# -------------------------------------------------------------------
126
# -------------------------------------------------------------------
127
127
128
new_instdir("basic");
128
new_instdir("basic");
129
$INST_FROM_SCRATCH and run_makefile_pl "PREFIX=$instdir/foo";
129
$INST_FROM_SCRATCH and run_makefile_pl "PREFIX=$instdir SYSCONFDIR=$instdir/etc DATADIR=$instdir/share/spamassassin LOCALSTATEDIR=$instdir/var/spamassassin CONFDIR=$instdir/etc/mail/spamassassin";
130
130
131
# we now have an "installed" version we can run sa-compile with.  Ensure
131
# we now have an "installed" version we can run sa-compile with.  Ensure
132
# sarun() will use it appropriately
132
# sarun() will use it appropriately
133
$scr = "$instdir/foo/$temp_binpath/spamassassin";
133
$scr = "$instdir/$temp_binpath/spamassassin";
134
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
134
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
135
135
136
set_rules q{
136
set_rules q{
Lines 140-146 Link Here
140
};
140
};
141
141
142
# ensure we don't use compiled rules
142
# ensure we don't use compiled rules
143
system("rm -rf $instdir/foo/var/spamassassin/compiled");
143
system("rm -rf $instdir/var/spamassassin/compiled");
144
%patterns = (
144
%patterns = (
145
145
146
  q{ check: tests=FOO }, 'FOO'
146
  q{ check: tests=FOO }, 'FOO'
Lines 152-165 Link Here
152
152
153
# -------------------------------------------------------------------
153
# -------------------------------------------------------------------
154
154
155
system_or_die "$instdir/foo/$temp_binpath/sa-compile --keep-tmps";  # --debug
155
system_or_die "$instdir/$temp_binpath/sa-compile --keep-tmps";  # --debug
156
%patterns = (
156
%patterns = (
157
157
158
  q{ able to use 1/1 'body_0' compiled rules }, 'able-to-use',
158
  q{ able to use 1/1 'body_0' compiled rules }, 'able-to-use',
159
  q{ check: tests=FOO }, 'FOO'
159
  q{ check: tests=FOO }, 'FOO'
160
160
161
);
161
);
162
$scr = "$instdir/foo/$temp_binpath/spamassassin";
162
$scr = "$instdir/$temp_binpath/spamassassin";
163
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
163
$scr_localrules_args = $scr_cf_args = "";      # use the default rules dir, from our "install"
164
ok sarun ("-D -Lt < $cwd/data/spam/001 2>&1", \&patterns_run_cb);
164
ok sarun ("-D -Lt < $cwd/data/spam/001 2>&1", \&patterns_run_cb);
165
ok_all_patterns();
165
ok_all_patterns();

Return to bug 7188