svn commit: samba r24709 - in branches/SAMBA_4_0: . source/script source/selftest

jelmer at samba.org jelmer at samba.org
Mon Aug 27 16:27:24 GMT 2007


Author: jelmer
Date: 2007-08-27 16:27:23 +0000 (Mon, 27 Aug 2007)
New Revision: 24709

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24709

Log:
Convert perl test harness output to subunit for nicer display.
Added:
   branches/SAMBA_4_0/source/script/harness2subunit.pl
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/selftest/test_pidl.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Added: branches/SAMBA_4_0/source/script/harness2subunit.pl
===================================================================
--- branches/SAMBA_4_0/source/script/harness2subunit.pl	2007-08-27 15:15:38 UTC (rev 24708)
+++ branches/SAMBA_4_0/source/script/harness2subunit.pl	2007-08-27 16:27:23 UTC (rev 24709)
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+my $firstline = 1;
+
+while(<STDIN>) {
+	if ($firstline) {
+		$firstline = 0;
+		next;
+	}
+	if (/^not ok (\d+) - (.*)$/) {
+		print "test: $2\n";
+		print "failure: $2\n";
+	} elsif (/^ok (\d+) - (.*)$/) {
+		print "test: $2\n";
+		print "success: $2\n";
+	} elsif (/^ok (\d+)$/) {
+		print "test: $1\n";
+		print "success: $1\n";
+	} elsif (/^ok (\d+) # skip (.*)$/) {
+		print "test: $1\n";
+		print "skip: $1 [\n$2\n]\n";
+	} elsif (/^not ok (\d+)$/) {
+		print "test: $1\n";
+		print "failure: $1\n";
+	} else {
+		print;
+	}
+}


Property changes on: branches/SAMBA_4_0/source/script/harness2subunit.pl
___________________________________________________________________
Name: svn:executable
   + *

Modified: branches/SAMBA_4_0/source/selftest/test_pidl.sh
===================================================================
--- branches/SAMBA_4_0/source/selftest/test_pidl.sh	2007-08-27 15:15:38 UTC (rev 24708)
+++ branches/SAMBA_4_0/source/selftest/test_pidl.sh	2007-08-27 16:27:23 UTC (rev 24709)
@@ -11,7 +11,7 @@
    echo "Skipping pidl tests - PIDL_TESTS_SKIP=yes"
 elif $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then
   for f in pidl/tests/*.pl; do
-     plantest "$f" none $PERL $f
+     plantest "$f" none $PERL $f "|" ./script/harness2subunit.pl
   done
 else 
    echo "Skipping pidl tests - Test::More not installed"



More information about the samba-cvs mailing list