[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2278-g718f9be

Jelmer Vernooij jelmer at samba.org
Fri Jun 12 12:35:18 GMT 2009


The branch, master has been updated
       via  718f9be8a2530a11e1cb16b68511b4c910a1c320 (commit)
      from  13e1654c4a1f8cf2ec38d4d56ae79790b7926c62 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 718f9be8a2530a11e1cb16b68511b4c910a1c320
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Jun 12 14:34:24 2009 +0200

    selftest: Add option to strip output of succeeded tests, and use it on
    the buildfarm.
    
    The matches the behaviour we had earlier in the previous output format.

-----------------------------------------------------------------------

Summary of changes:
 selftest/Subunit/Filter.pm |   20 ++++++++++++++++++--
 selftest/filter-subunit.pl |    5 ++++-
 source4/selftest/config.mk |    2 +-
 3 files changed, 23 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/Subunit/Filter.pm b/selftest/Subunit/Filter.pm
index 443baeb..93b690d 100644
--- a/selftest/Subunit/Filter.pm
+++ b/selftest/Subunit/Filter.pm
@@ -54,7 +54,11 @@ sub report_time($$)
 sub output_msg($$)
 {
 	my ($self, $msg) = @_;
-	print $msg;
+	unless(defined($self->{output})) {
+		print $msg;
+	} else {
+		$self->{output}.=$msg;
+	}
 }
 
 sub start_test($$)
@@ -65,6 +69,10 @@ sub start_test($$)
 		$testname = $self->{prefix}.$testname;
 	}
 
+	if ($self->{strip_ok_output}) {
+		$self->{output} = "";
+	}
+
 	Subunit::start_test($testname);
 }
 
@@ -87,6 +95,13 @@ sub end_test($$$$$)
 		$reason .= $xfail_reason;
 	}
 
+	if ($self->{strip_ok_output}) {
+		unless ($result eq "success" or $result eq "xfail" or $result eq "skip") {
+			print $self->{output}
+		}
+	}
+	$self->{output} = undef;
+
 	Subunit::end_test($testname, $result, $reason);
 }
 
@@ -120,11 +135,12 @@ sub testsuite_count($$)
 }
 
 sub new {
-	my ($class, $prefix, $expected_failures) = @_;
+	my ($class, $prefix, $expected_failures, $strip_ok_output) = @_;
 
 	my $self = { 
 		prefix => $prefix,
 		expected_failures => $expected_failures,
+		strip_ok_output => $strip_ok_output,
 		xfail_added => 0,
 	};
 	bless($self, $class);
diff --git a/selftest/filter-subunit.pl b/selftest/filter-subunit.pl
index 1c25db6..5a2e5e3 100755
--- a/selftest/filter-subunit.pl
+++ b/selftest/filter-subunit.pl
@@ -62,10 +62,12 @@ use Subunit::Filter;
 my $opt_expected_failures = undef;
 my $opt_help = 0;
 my $opt_prefix = undef;
+my $opt_strip_ok_output = 0;
 my @expected_failures = ();
 
 my $result = GetOptions(
 		'expected-failures=s' => \$opt_expected_failures,
+		'strip-passed-output' => \$opt_strip_ok_output,
 		'prefix=s' => \$opt_prefix,
 		'help' => \$opt_help,
 	);
@@ -89,7 +91,8 @@ my $statistics = {
 	TESTS_SKIP => 0,
 };
 
-my $msg_ops = new Subunit::Filter($opt_prefix, \@expected_failures);
+my $msg_ops = new Subunit::Filter($opt_prefix, \@expected_failures, 
+	                              $opt_strip_ok_output);
 
 parse_results($msg_ops, $statistics, *STDIN);
 
diff --git a/source4/selftest/config.mk b/source4/selftest/config.mk
index e6b338b..27ea35d 100644
--- a/source4/selftest/config.mk
+++ b/source4/selftest/config.mk
@@ -19,7 +19,7 @@ slowtest:: everything
 
 ifeq ($(RUN_FROM_BUILD_FARM),yes)
 test:: everything
-	$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) $(TESTS) | $(FILTER_XFAIL)
+	$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) $(TESTS) | $(FILTER_XFAIL) --strip-passed-output
 else
 test:: everything
 	$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) $(TESTS) | $(FORMAT_TEST_OUTPUT) --immediate 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list