s3:torture: add a test LOCAL-DBTRANS to torture dbwrap with transactions.
[Samba.git] / lib / subunit / tap2subunit
blob9e335168f522f4aeefda876cd4d58c341ffd0a3e
1 #!/usr/bin/perl
2 # Simple script that converts Perl test harness output to
3 # Subunit
4 # Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org>
5 # Published under the GNU GPL, v3 or later
7 my $firstline = 1;
8 my $error = 0;
9 while(<STDIN>) {
10 if ($firstline) {
11 $firstline = 0;
12 next;
14 if (/^not ok (\d+) - (.*)$/) {
15 print "test: $2\n";
16 print "failure: $2\n";
17 $error = 1;
18 } elsif (/^ok (\d+) - (.*)$/) {
19 print "test: $2\n";
20 print "success: $2\n";
21 } elsif (/^ok (\d+)$/) {
22 print "test: $1\n";
23 print "success: $1\n";
24 } elsif (/^ok (\d+) # skip (.*)$/) {
25 print "test: $1\n";
26 print "skip: $1 [\n$2\n]\n";
27 } elsif (/^not ok (\d+)$/) {
28 print "test: $1\n";
29 print "failure: $1\n";
30 $error = 1;
31 } else {
32 print;
35 exit $error;