[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Fri Mar 19 23:51:39 MDT 2010
The branch, master has been updated
via c04922e... build: useful shell vars for setting up selftest
via 429102e... subunit: fixed reporting of unexpected failures
via 77b77e6... subunit: keep total error and failure counts
from a52b3df... s4-selftest: skip RPC-DFS for s4 entirely.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c04922ec20034beec9e37232ce5fa35596bf7ca0
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Mar 19 17:24:53 2010 +1100
build: useful shell vars for setting up selftest
commit 429102e6bde396492e53a1984242de46e28dd9d1
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Mar 19 14:26:18 2010 +1100
subunit: fixed reporting of unexpected failures
commit 77b77e6ba13137522b542d364891aba031a3ede8
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Mar 19 14:24:31 2010 +1100
subunit: keep total error and failure counts
-----------------------------------------------------------------------
Summary of changes:
selftest/Subunit.pm | 17 ++++++++++-------
selftest/Subunit/Filter.pm | 8 ++++++++
source4/scripting/devel/selftest-vars.sh | 9 +++++++++
3 files changed, 27 insertions(+), 7 deletions(-)
create mode 100644 source4/scripting/devel/selftest-vars.sh
Changeset truncated at 500 lines:
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm
index 718b8ce..2a9fc0e 100644
--- a/selftest/Subunit.pm
+++ b/selftest/Subunit.pm
@@ -27,8 +27,6 @@ sub parse_results($$$)
{
my ($msg_ops, $statistics, $fh) = @_;
my $expected_fail = 0;
- my $unexpected_fail = 0;
- my $unexpected_err = 0;
my $open_tests = [];
while(<$fh>) {
@@ -72,7 +70,6 @@ sub parse_results($$$)
pop(@$open_tests); #FIXME: Check that popped value == $testname
$statistics->{TESTS_UNEXPECTED_FAIL}++;
$msg_ops->end_test($testname, "failure", 1, $reason);
- $unexpected_fail++;
} elsif ($result eq "skip") {
$statistics->{TESTS_SKIP}++;
# Allow tests to be skipped without prior announcement of test
@@ -85,7 +82,6 @@ sub parse_results($$$)
$statistics->{TESTS_ERROR}++;
pop(@$open_tests); #FIXME: Check that popped value == $testname
$msg_ops->end_test($testname, "error", 1, $reason);
- $unexpected_err++;
} elsif ($result eq "skip-testsuite") {
$msg_ops->skip_testsuite($testname);
} elsif ($result eq "testsuite-success") {
@@ -110,11 +106,18 @@ sub parse_results($$$)
$msg_ops->end_test(pop(@$open_tests), "error", 1,
"was started but never finished!");
$statistics->{TESTS_ERROR}++;
- $unexpected_err++;
}
- return 1 if $unexpected_err > 0;
- return 1 if $unexpected_fail > 0;
+ # if the Filter module is in use, it will have the right counts
+ if (defined($msg_ops->{total_error})) {
+ $statistics->{TESTS_ERROR} = $msg_ops->{total_error};
+ $statistics->{TESTS_UNEXPECTED_FAIL} = $msg_ops->{total_fail};
+ $statistics->{TESTS_EXPECTED_FAIL} = $msg_ops->{total_xfail};
+ }
+
+ return 1 if $statistics->{TESTS_ERROR} > 0;
+ return 1 if $statistics->{TESTS_UNEXPECTED_FAIL} > 0;
+
return 0;
}
diff --git a/selftest/Subunit/Filter.pm b/selftest/Subunit/Filter.pm
index 896721a..4a94f25 100644
--- a/selftest/Subunit/Filter.pm
+++ b/selftest/Subunit/Filter.pm
@@ -88,20 +88,24 @@ sub end_test($$$$$)
if (($result eq "fail" or $result eq "failure") and not $unexpected) {
$result = "xfail";
$self->{xfail_added}++;
+ $self->{total_xfail}++;
}
my $xfail_reason = find_in_list($self->{expected_failures}, $testname);
if (defined($xfail_reason) and ($result eq "fail" or $result eq "failure")) {
$result = "xfail";
$self->{xfail_added}++;
+ $self->{total_xfail}++;
$reason .= $xfail_reason;
}
if ($result eq "fail" or $result eq "failure") {
$self->{fail_added}++;
+ $self->{total_fail}++;
}
if ($result eq "error") {
$self->{error_added}++;
+ $self->{total_error}++;
}
if ($self->{strip_ok_output}) {
@@ -124,6 +128,7 @@ sub start_testsuite($;$)
{
my ($self, $name) = @_;
Subunit::start_testsuite($name);
+
$self->{error_added} = 0;
$self->{fail_added} = 0;
$self->{xfail_added} = 0;
@@ -171,6 +176,9 @@ sub new {
expected_failures => $expected_failures,
strip_ok_output => $strip_ok_output,
xfail_added => 0,
+ total_xfail => 0,
+ total_error => 0,
+ total_fail => 0
};
bless($self, $class);
}
diff --git a/source4/scripting/devel/selftest-vars.sh b/source4/scripting/devel/selftest-vars.sh
new file mode 100644
index 0000000..a20576f
--- /dev/null
+++ b/source4/scripting/devel/selftest-vars.sh
@@ -0,0 +1,9 @@
+# . these into your shell to allow you to run with socketwrapper
+# outside the test environment
+
+export SELFTEST_INTERFACES=127.0.0.6/8,127.0.0.7/8,127.0.0.8/8,127.0.0.9/8,127.0.0.10/8,127.0.0.11/8
+export SOCKET_WRAPPER_DEFAULT_IFACE=6
+export SOCKET_WRAPPER_DIR=./st/w
+export UID_WRAPPER=1
+export NSS_WRAPPER_PASSWD=st/dc/passwd
+export NSS_WRAPPER_GROUP=st/dc/passwd
--
Samba Shared Repository
More information about the samba-cvs
mailing list