r25398: Parse loadparm context to all lp_*() functions.
[kai/samba.git] / source4 / script / harness2subunit.pl
1 #!/usr/bin/perl
2
3 my $firstline = 1;
4
5 while(<STDIN>) {
6         if ($firstline) {
7                 $firstline = 0;
8                 next;
9         }
10         if (/^not ok (\d+) - (.*)$/) {
11                 print "test: $2\n";
12                 print "failure: $2\n";
13         } elsif (/^ok (\d+) - (.*)$/) {
14                 print "test: $2\n";
15                 print "success: $2\n";
16         } elsif (/^ok (\d+)$/) {
17                 print "test: $1\n";
18                 print "success: $1\n";
19         } elsif (/^ok (\d+) # skip (.*)$/) {
20                 print "test: $1\n";
21                 print "skip: $1 [\n$2\n]\n";
22         } elsif (/^not ok (\d+)$/) {
23                 print "test: $1\n";
24                 print "failure: $1\n";
25         } else {
26                 print;
27         }
28 }