[Bps-public-commit] Test-Chimps-Anna branch, master, updated. 9ab75dc73209f07579d12c86e2dcc4d6d769c583

sartak at bestpractical.com sartak at bestpractical.com
Wed Oct 7 16:29:41 EDT 2009


The branch, master has been updated
       via  9ab75dc73209f07579d12c86e2dcc4d6d769c583 (commit)
      from  a8c7e45baa84c596730a65f7a79b2a929c56bc71 (commit)

Summary of changes:
 lib/Test/Chimps/Anna.pm |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 9ab75dc73209f07579d12c86e2dcc4d6d769c583
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Oct 7 16:28:19 2009 -0400

    Specify long test durations as minutes

diff --git a/lib/Test/Chimps/Anna.pm b/lib/Test/Chimps/Anna.pm
index 29f82d9..aa8b7a7 100644
--- a/lib/Test/Chimps/Anna.pm
+++ b/lib/Test/Chimps/Anna.pm
@@ -159,13 +159,22 @@ sub tick {
     $reports->order_by( column => 'id' );
 
     while ( my $report = $reports->next ) {
+        # specify long test durations as minutes
+        my $duration;
+        if ($report->duration > 120) {
+            $duration = int($report->duration / 60) . 'm';
+        }
+        else {
+            $duration = $report->duration . 's';
+        }
+
         if ( $report->total_failed || $report->total_unexpectedly_succeeded ) {
             $self->{passing_projects}->{ $report->project } = 0;
 
             my ( $rev, $committer, $date ) = $self->preprocess_report_metadata($report);
 
             my $msg
-                = $report->project . " " 
+                = $report->project . " "
                 . $rev . " by "
                 . $committer
                 . " "
@@ -182,7 +191,7 @@ sub tick {
                 . " skipped, "
                 . $report->total_unexpectedly_succeeded
                 . " unexpectedly ok; "
-                . $report->duration . "s.  "
+                . $duration . ".  "
                 . $self->{server_script} . "?id="
                 . $report->id;
 
@@ -218,7 +227,7 @@ sub tick {
                         . $rev . " by "
                         . $committer
                         . ( $report->can('committed_date') ? ' ' . $date : '' ) . "; "
-                        . $report->duration . "s.  " . "All "
+                        . $duration . ".  " . "All "
                         . $report->total_passed
                         . " tests pass" );
             }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list