diff --git a/sandbox/prove2junit.pl b/sandbox/prove2junit.pl
index 86de1a88..a6874dbe 100755
--- a/sandbox/prove2junit.pl
+++ b/sandbox/prove2junit.pl
@@ -5,6 +5,7 @@ use warnings;
my $file = $ARGV[0];
my $testcase = "";
+my $testsuite = "";
my $error_collect = "";
my $error_print = "";
@@ -14,12 +15,20 @@ if (not defined $file) {
open (my $info, $file) or die "Could not open $file: $!";
-print "\n";
+print "\n";
while(my $line = <$info>) {
- if ($line =~ /^(t\/\S+).* (\.*) (skipped:) (.*)$/) { print "Skip reason:\n"; }
+ if ($line =~ /^(t\/)(\S+)(\/)(\S+).* (\.*) (skipped:) (.*)$/) { print "Skip reason:\n"; }
elsif ($line =~ /^ok (\d+) - (.*)$/) { print "Test description:\n"; }
elsif ($line =~ /^not ok (\d+) - (.*)$/) { print "Test description:\n"; }
- elsif ($line =~ /^(t\/\S+).* (\.*) $/) { $testcase = "$1"; $error_print = $error_collect; $error_collect = ""; }
+ elsif ($line =~ /^(t\/)(\S+)(\/)(\S+).* (\.*) $/) {
+ if ( "$2" eq "$testsuite" ) {
+ $testcase = "$4"; $error_print = $error_collect; $error_collect = "";
+ }
+ else {
+ if ( "$testsuite" ne "" ) { print "\n"; }
+ $testsuite = "$2"; $testcase = "$4"; $error_print = $error_collect; $error_collect = ""; print "\n";
+ }
+ }
elsif ($line !~ /^ok$/ && $line !~ /^\d+..\d+$/) { $error_collect = $error_collect . $line; }
}
-print "\n"
+print "\n\n";