File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -382,16 +382,18 @@ ($)
382382 my $output_file = " " ;
383383 my $descriptor_file = " " ;
384384
385- while (<LOG>) {
386- chomp ;
387- if (/ ^Test '(.+)'/ ) {
385+ while (my $line = <LOG>) {
386+ chomp $line ;
387+ if ($line =~ / ^Test '(.+)'/ ) {
388388 $current_test = $1 ;
389389 $printed_this_test = 0;
390- } elsif (/ Descriptor:\s +([^\s ]+)/ ) {
390+ } elsif ($line =~ / Descriptor:\s +([^\s ]+)/ ) {
391391 $descriptor_file = $1 ;
392- } elsif (/ Output:\s +([^\s ]+)/ ) {
392+ } elsif ($line =~ / Output:\s +([^\s ]+)/ ) {
393393 $output_file = $1 ;
394- } elsif (/ \[ FAILED\]\s *$ / ) {
394+ } elsif ($line =~ / \[ FAILED\]\s *$ / ) {
395+ # print a descriptive header before dumping the test.desc lines that
396+ # actually weren't matched (and print this header just once)
395397 if (0 == $printed_this_test ) {
396398 $printed_this_test = 1;
397399 print " \n\n " ;
403405 close FH;
404406 print " \n\n Failed $descriptor_file lines:\n " ;
405407 }
406- print " $_ \n " ;
408+
409+ print " $line \n " ;
407410 }
408411 }
409412}
You can’t perform that action at this time.
0 commit comments