Author: earle Date: 2008-01-30 17:06:49 +0000 (Wed, 30 Jan 2008) New Revision: 1149
Added: status/report.pl Removed: status/parse.pl Log: Rename script.
Deleted: status/parse.pl =================================================================== --- status/parse.pl 2008-01-30 16:20:52 UTC (rev 1148) +++ status/parse.pl 2008-01-30 17:06:49 UTC (rev 1149) @@ -1,38 +0,0 @@ -#!/usr/bin/perl - -use warnings; -use strict; - -use Data::Dumper; -use Template; - -my $file = $ARGV[0]; - -die 'No input file specified' unless $file; -die "That file doesn't exist" unless -e $file; -die "That isn't a plain file" unless -f _; -die "That file isn't readable" unless -r _; - -open (my $RESULTS, '<', $file) or die "Can't open $file: $!"; -my @lines = <$RESULTS>; -close $RESULTS; - -my (%tests, $current_test); - -foreach (@lines) { - chomp; - - if (m{^t/(.*?).}) { - $current_test = $1; - } elsif (/^ok$/) { - $tests{$current_test} = 100; - } elsif (/Failed .*? tests, (.*?)% okay/) { - $tests{$current_test} = $1; - } -} - -my $tt = Template->new({ - INCLUDE_PATH => 'templates', -}); - -$tt->process('tests.tt', { 'tests' => %tests }) or die $tt->error; \ No newline at end of file
Copied: status/report.pl (from rev 1147, status/parse.pl) =================================================================== --- status/report.pl (rev 0) +++ status/report.pl 2008-01-30 17:06:49 UTC (rev 1149) @@ -0,0 +1,38 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +use Data::Dumper; +use Template; + +my $file = $ARGV[0]; + +die 'No input file specified' unless $file; +die "That file doesn't exist" unless -e $file; +die "That isn't a plain file" unless -f _; +die "That file isn't readable" unless -r _; + +open (my $RESULTS, '<', $file) or die "Can't open $file: $!"; +my @lines = <$RESULTS>; +close $RESULTS; + +my (%tests, $current_test); + +foreach (@lines) { + chomp; + + if (m{^t/(.*?).}) { + $current_test = $1; + } elsif (/^ok$/) { + $tests{$current_test} = 100; + } elsif (/Failed .*? tests, (.*?)% okay/) { + $tests{$current_test} = $1; + } +} + +my $tt = Template->new({ + INCLUDE_PATH => 'templates', +}); + +$tt->process('tests.tt', { 'tests' => %tests }) or die $tt->error; \ No newline at end of file
openguides-commits@lists.openguides.org