[Rt-commit] r5647 - in Test-Chimps-Anna/trunk: .

zev at bestpractical.com zev at bestpractical.com
Fri Jul 21 21:38:40 EDT 2006


Author: zev
Date: Fri Jul 21 21:38:40 2006
New Revision: 5647

Modified:
   Test-Chimps-Anna/trunk/   (props changed)
   Test-Chimps-Anna/trunk/Changes
   Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm

Log:
 r11836 at truegrounds:  zev | 2006-07-21 21:38:34 -0400
 * announce when the build is fixed


Modified: Test-Chimps-Anna/trunk/Changes
==============================================================================
--- Test-Chimps-Anna/trunk/Changes	(original)
+++ Test-Chimps-Anna/trunk/Changes	Fri Jul 21 21:38:40 2006
@@ -1,7 +1,10 @@
 Revision history for Test-Chimps-Anna
 
-0.01    Thu Jun 22 15:37:00 EDT 2006
-        Initial release 
+0.03    Fri Jul 21 21:36:01 EDT 2006
+        * anna now announces when a project passes all its tests after having failed them
 
 0.02    Wed Jul 12 17:07:57 EDT 2006
-        Initial CPAN release, now with documentation.
\ No newline at end of file
+        Initial CPAN release, now with documentation.
+
+0.01    Thu Jun 22 15:37:00 EDT 2006
+        Initial release 
\ No newline at end of file

Modified: Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm
==============================================================================
--- Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm	(original)
+++ Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm	Fri Jul 21 21:38:40 2006
@@ -17,11 +17,11 @@
 
 =head1 VERSION
 
-Version 0.02
+Version 0.03
 
 =cut
 
-our $VERSION = '0.02';
+our $VERSION = '0.03';
 
 =head1 SYNOPSIS
 
@@ -100,6 +100,7 @@
 
   $self->{oid} = $self->_get_highest_oid;
   $self->{first_run} = 1;
+  $self->{passing_projects} = {};
   return $self;
 }
 
@@ -148,6 +149,7 @@
 
   while(my $report = $reports->next) {
     if ($report->total_failed || $report->total_unexpectedly_succeeded) {
+      $self->{passing_projects}->{$report->project} = 0;
       my $msg =
         "Smoke report for " .  $report->project . " r" . $report->revision . " submitted: "
         . sprintf( "%.2f", $report->total_ratio * 100 ) . "\%, "
@@ -160,6 +162,18 @@
         . $self->{server_script} . "?id=" . $report->id;
 
       $self->_say_to_all($msg);
+    } else {
+      if (! exists $self->{passing_projects}->{$report->project}) {
+        # don't announce if we've never seen this project before
+        $self->{passing_projects}->{$report->project} = 1;
+      }
+      next if $self->{passing_projects}->{$report->project};
+      $self->{passing_projects}->{$report->project} = 1;
+      
+      $self->{passing_projects}->{$report->project}++;
+      $self->_say_to_all("Smoke report for " .  $report->project
+                         . " r" . $report->revision . " submitted: "
+                         . "all " . $report->total_ok . " tests pass");
     }
   }
 


More information about the Rt-commit mailing list