File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 4
4
5
5
open LOG," <tests.log" or die " Failed to open tests.log\n " ;
6
6
7
- my $ignore = 1;
7
+ my $printed_this_test = 1;
8
8
my $current_test = " " ;
9
9
10
10
while (<LOG>) {
11
11
chomp ;
12
12
if (/ ^Test '(.+)'/ ) {
13
13
$current_test = $1 ;
14
- $ignore = 0;
15
- } elsif (1 == $ignore ) {
16
- next ;
14
+ $printed_this_test = 0;
17
15
} elsif (/ \[ FAILED\]\s *$ / ) {
18
- $ignore = 1;
19
- print " Failed test: $current_test \n " ;
20
- my $outf = ` sed -n '2p' $current_test /test.desc` ;
21
- $outf =~ s /\. .*$/ .out/ ;
22
- system (" cat $current_test /$outf " );
23
- print " \n\n " ;
16
+ if (0 == $printed_this_test ) {
17
+ $printed_this_test = 1;
18
+ print " \n\n " ;
19
+ print " Failed test: $current_test \n " ;
20
+ my $outf = ` sed -n '2p' $current_test /test.desc` ;
21
+ $outf =~ s /\. .*$/ .out/ ;
22
+ system (" cat $current_test /$outf " );
23
+ print " \n\n Failed test.desc lines:\n " ;
24
+ }
25
+ print " $_ \n " ;
24
26
}
25
27
}
26
28
You can’t perform that action at this time.
0 commit comments