File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 6
6
7
7
my $printed_this_test = 1;
8
8
my $current_test = " " ;
9
+ my $output_file = " " ;
10
+ my $descriptor_file = " " ;
9
11
10
12
while (<LOG>) {
11
13
chomp ;
12
14
if (/ ^Test '(.+)'/ ) {
13
15
$current_test = $1 ;
14
16
$printed_this_test = 0;
17
+ } elsif (/ Descriptor:\s +([^\s ]+)/ ) {
18
+ $descriptor_file = $1 ;
19
+ } elsif (/ Output:\s +([^\s ]+)/ ) {
20
+ $output_file = $1 ;
15
21
} elsif (/ \[ FAILED\]\s *$ / ) {
16
22
if (0 == $printed_this_test ) {
17
23
$printed_this_test = 1;
18
24
print " \n\n " ;
19
25
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 " ;
26
+ system (" cat $current_test /$output_file " );
27
+ print " \n\n Failed $descriptor_file lines:\n " ;
24
28
}
25
29
print " $_ \n " ;
26
30
}
Original file line number Diff line number Diff line change 3
3
use subs;
4
4
use strict;
5
5
use warnings;
6
+ use File::Basename;
6
7
7
8
use Cwd;
8
9
@@ -71,7 +72,8 @@ ($$$$$)
71
72
72
73
$options =~ s / $ign// g if (defined ($ign ));
73
74
74
- my $output = $input ;
75
+ my $descriptor = basename($test );
76
+ my $output = $descriptor ;
75
77
$output =~ s /\. [^.]*$/ .out/ ;
76
78
77
79
if ($output eq $input ) {
@@ -82,6 +84,7 @@ ($$$$$)
82
84
print LOG " Test '$name '\n " ;
83
85
print LOG " Level: $level \n " ;
84
86
print LOG " Input: $input \n " ;
87
+ print LOG " Descriptor: $descriptor \n " ;
85
88
print LOG " Output: $output \n " ;
86
89
print LOG " Options: $options \n " ;
87
90
print LOG " Results:\n " ;
You can’t perform that action at this time.
0 commit comments