Re: Questions, a patch and a script

[email protected] (Abe Timmerman) Sun, 19 Oct 2003 15:13:25 +0200
Newsgroups perl.daily-build
Message-ID <[email protected]>
Op een zonnige herfstdag (Saturday 18 October 2003 18:24), schreef Abe 
Timmerman:

> Op een zonnige herfstdag (Saturday 18 October 2003 16:53), schreef David
> Landgren:
[snip]
> > I have patched smokerstatus.pl to print out the mean smoke duration. I
> > don't have a diff, but it just involves adding the following line:
> >
> > print "$rpt->{count} out of $ccnt configurations finished in
> > $rpt->{time}.\n",
> >        "Mean smoke duration: @{[time_in_hhmm(int $rpt->{avg})]}.\n";
> >
> > printf "$rpt->{fail} configuration%s showed failures%s.\n",
> >         ($rpt->{fail} == 1 ? "" : "s"), $rpt->{stat} ? " ($rpt->{stat})"
> >
> > : "";
>
> Thanks, I'll put that into the next release, seems like a useful datapoint.

And this is what I made of it:

___________________________________________________________________________
[   479] By: abeltje                          on 2003-10-19 14:28:15 +0200
        Log: * [CHANGE] by David Landgren
               + I have patched smokerstatus.pl to print out the mean
                 smoke duration. I don't have a diff, but it just involves
                 adding the following line:
        Url: http://ztreet.xs4all.nl/svn/Test-Smoke-1.18.xx
           ! /Test-Smoke-1.18.xx/smokestatus.pl

Index: smokestatus.pl
===================================================================
--- smokestatus.pl      (revision 478)
+++ smokestatus.pl      (revision 479)
@@ -4,7 +4,7 @@

 # $Id$
 use vars qw( $VERSION );
-$VERSION = '0.005';
+$VERSION = '0.006';

 use Cwd;
 use File::Spec;
@@ -119,6 +119,9 @@
     printf "    $todo configuration%s to finish$todo_time\n",
            $todo == 1 ? "" : "s"
         if $todo;
+
+    printf "    Average smoke duration: %s.\n", time_in_hhmm( $rpt->{avg} )
+        if $rpt->{count};
 }

 sub guess_status {

-- Generated by 'svnchanges' (0.009) --

good luck,

Abe
-- 
Amsterdam Perl Mongers http://amsterdam.pm.org
perl -we '$_="rekcah lreP rehtona tsuJ";print$2while s/(.*)(.)/$1/g'