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 2005/12/11 03:15:27 UTC
svn commit: r355872 - in /spamassassin/trunk: build/automc/run_preflight
masses/mass-check
Author: jm
Date: Sat Dec 10 18:15:23 2005
New Revision: 355872
URL: http://svn.apache.org/viewcvs?rev=355872&view=rev
Log:
better, intermediate-level noisiness from mass-check for buildbot
Modified:
spamassassin/trunk/build/automc/run_preflight
spamassassin/trunk/masses/mass-check
Modified: spamassassin/trunk/build/automc/run_preflight
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/build/automc/run_preflight?rev=355872&r1=355871&r2=355872&view=diff
==============================================================================
--- spamassassin/trunk/build/automc/run_preflight (original)
+++ spamassassin/trunk/build/automc/run_preflight Sat Dec 10 18:15:23 2005
@@ -67,7 +67,7 @@
run "/local/bbmasstools/masschroot $perl ".
"mass-check -c=tstrules --tail=30000 --cache -j=1 ".
- "--noisy --showdots ".
+ "--noisy ".
"--deencap='petuniapress.com' ".
"-f $targets";
Modified: spamassassin/trunk/masses/mass-check
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/mass-check?rev=355872&r1=355871&r2=355872&view=diff
==============================================================================
--- spamassassin/trunk/masses/mass-check (original)
+++ spamassassin/trunk/masses/mass-check Sat Dec 10 18:15:23 2005
@@ -107,7 +107,7 @@
use Getopt::Long;
use POSIX qw(strftime);
use constant HAS_TIME_PARSEDATE => eval { require Time::ParseDate; };
-use Config;
+use Config;
# default settings
$opt_c = "$FindBin::Bin/../rules";
@@ -254,6 +254,10 @@
my $ham_count = 0;
my $init_results = 0;
+my $showdots_active = ($opt_showdots || $opt_noisy);
+my $showdots_counter = 0;
+my $showdots_every = ($opt_showdots ? 1 : 20);
+
# Deal with --rewrite
if (defined $opt_rewrite) {
my $rewrite = ($opt_rewrite ? $opt_rewrite : "/tmp/out");
@@ -297,9 +301,7 @@
}
sub scan_progress_cb {
- if ($opt_showdots) {
- print STDERR '.';
- }
+ showdots_blip();
}
$iter->set_functions(\&wanted, \&result);
@@ -309,7 +311,7 @@
status('completed run stage');
}
-print STDERR "\n" if ($opt_showdots);
+showdots_finish();
if (defined $opt_rewrite) {
close(REWRITE);
@@ -336,7 +338,10 @@
###########################################################################
sub init_results {
- print STDERR "\n" if ($opt_showdots);
+ showdots_finish();
+
+ # now, showdots only happens if --showdots was used
+ $showdots_active = $opt_showdots;
if ($opt_progress) {
# make it a local variable for now
@@ -585,11 +590,25 @@
undef $ma; # clean 'em up
undef $status;
- if ($opt_showdots) {
+ showdots_blip();
+ return $out;
+}
+
+sub showdots_blip {
+ return unless ($showdots_active);
+
+ $showdots_counter++;
+ if ($showdots_counter % $showdots_every == 0) {
print STDERR '.';
+ if ($showdots_counter % (60 * $showdots_every) == 0) {
+ print STDERR "\n";
+ }
}
+}
- return $out;
+sub showdots_finish {
+ print STDERR "\n" if ($showdots_active);
+ $showdots_counter = 0;
}
# ick. We have to go grovelling through the body parts to see if a message