[tapx-dev] [commit][219] Fixed typo
andy at hexten.net
andy at hexten.net
Fri Aug 10 14:20:20 BST 2007
Revision: 219
Author: andy
Date: 2007-08-10 14:20:20 +0100 (Fri, 10 Aug 2007)
Log Message:
-----------
Fixed typo
Modified Paths:
--------------
trunk/smoke/smoke.pl
Modified: trunk/smoke/smoke.pl
===================================================================
--- trunk/smoke/smoke.pl 2007-08-10 12:59:48 UTC (rev 218)
+++ trunk/smoke/smoke.pl 2007-08-10 13:20:20 UTC (rev 219)
@@ -8,12 +8,15 @@
use IPC::Open3;
use IO::Select;
use Mail::Send;
+use Getopt::Long;
use YAML qw< DumpFile LoadFile >;
use constant SVN => '/usr/bin/svn';
use constant STATUS => '/home/andy/.smoke-tapx';
use constant WORK => '/home/andy/.smoke-work';
+GetOptions( 'v|verbose' => \my $VERBOSE );
+
my %PERLS = (
'5.0.5' => '/home/andy/Works/Perl/versions/5.0.5',
'5.6.1' => '/home/andy/Works/Perl/versions/5.6.1',
@@ -33,9 +36,11 @@
'yes n | %PERL% Makefile.PL',
'make',
[ 'make test', \&check_test ],
+
# Dogfood
[ '%PERL% -Ilib bin/runtests t/*.t t/compat/*.t', \&check_test ],
],
+
mailto => 'tapx-dev at hexten.net',
}
);
@@ -46,6 +51,11 @@
test_and_report($repo);
}
+sub mention {
+ return unless $VERBOSE;
+ print join( '', @_ ), "\n";
+}
+
sub get_revision {
my $repo = shift;
my @cmd = ( SVN, 'info', $repo );
@@ -64,11 +74,18 @@
}
sub test_and_report {
- my $repo = shift;
- my $name = $repo->{name};
- my $Status = $Status->{$name} ||= {};
+ my $repo = shift;
+ my $name = $repo->{name};
+ my $Status = $Status->{$name} ||= {};
+
+ mention("Checking $name");
+
my $cur_rev = get_revision( $repo->{svn} );
+ mention( "Last tested: ", $Status->{revision} )
+ if exists $Status->{revision};
+ mention( "Current: ", $cur_rev );
+
return if exists $Status->{revision} && $Status->{revision} == $cur_rev;
my $mailto = $repo->{mailto};
@@ -189,7 +206,7 @@
my $results = capture_command($cooked);
my $status
- = $check->{$results}
+ = $check->($results)
? ( $results->{status} ? 'died' : 'passed' )
: 'failed';
@@ -202,6 +219,9 @@
sub capture_command {
my @cmd = @_;
my $cmd = join ' ', @cmd;
+
+ mention($cmd);
+
my $out = IO::Handle->new;
my $err = IO::Handle->new;
More information about the tapx-dev
mailing list