spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From par...@apache.org
Subject svn commit: r167871 - in /spamassassin/trunk: masses/parse-rules-for-masses t/meta.t
Date Tue, 03 May 2005 06:53:19 GMT
Author: parker
Date: Mon May  2 23:53:18 2005
New Revision: 167871

URL: http://svn.apache.org/viewcvs?rev=167871&view=rev
Log:
Ignore test rules when running meta.t tests

Modified:
    spamassassin/trunk/masses/parse-rules-for-masses
    spamassassin/trunk/t/meta.t

Modified: spamassassin/trunk/masses/parse-rules-for-masses
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/parse-rules-for-masses?rev=167871&r1=167870&r2=167871&view=diff
==============================================================================
--- spamassassin/trunk/masses/parse-rules-for-masses (original)
+++ spamassassin/trunk/masses/parse-rules-for-masses Mon May  2 23:53:18 2005
@@ -23,23 +23,24 @@
 parse-rules-for-masses: parse the SpamAssassin rules files for mass-checks,
         evolving, and frequency analysis
 
-usage: ./parse-rules-for-masses [-d rulesdir] [-o outputfile] [-s scoreset]
+usage: ./parse-rules-for-masses [-d rulesdir] [-o outputfile] [-s scoreset] [-x]
 
 rulesdir defaults to ../rules
 outputfile defaults to ./tmp/rules.pl
 scoreset default to 0
-
+-x do not include test rules files (ie 70_*)
 ";
 }
 
 use Getopt::Long;
 use Data::Dumper;
 
-use vars qw(@rulesdirs $outputfile $scoreset);
+use vars qw(@rulesdirs $outputfile $scoreset $skip_test_rules);
 GetOptions (
                 "d=s" => \@rulesdirs,
                 "o=s" => \$outputfile,
 		"s=i" => \$scoreset,
+	        "x" => \$skip_test_rules,
                 "help|h|?" => sub { usage(); } );
 
 if ($#rulesdirs < 0) {
@@ -74,6 +75,9 @@
     my %rulesfound = ();
     my %langs = ();
     foreach $file (sort @files) {
+      if ($skip_test_rules) {
+	next if ($file =~ /7\d_/);
+      }
       open (IN, "<$file");
       while (<IN>)
       {

Modified: spamassassin/trunk/t/meta.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/meta.t?rev=167871&r1=167870&r2=167871&view=diff
==============================================================================
--- spamassassin/trunk/t/meta.t (original)
+++ spamassassin/trunk/t/meta.t Mon May  2 23:53:18 2005
@@ -38,7 +38,7 @@
   unlink $output || die;
   %rules = ();
   %scores = ();
-  if (system("$prefix/masses/parse-rules-for-masses -o $output -d \"$prefix/rules\" -s $scoreset"))
{
+  if (system("$prefix/masses/parse-rules-for-masses -o $output -d \"$prefix/rules\" -s $scoreset
-x")) {
     warn "parse-rules-for-masses failed!";
   }
   eval {



Mime
View raw message