[SCM] Samba Shared Repository - branch master updated
Jelmer Vernooij
jelmer at samba.org
Sat Sep 4 21:02:07 MDT 2010
The branch, master has been updated
via e4d1bdb s4/selftest: Fix path to include/config.h, set BUILDDIR automatically.
via 851ad13 selftest: Cope with parentheses in testnames in --load-list.
via 474c98f selftest/subunit: Parse timestamps generated by upstream subunit.
via ef96570 selftest: Print out unmatched tests when using --load-list.
from 3c25067 dsgetinfo: Set modulesdir when using ldb without ldb_wrap
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e4d1bdbe5505d63f7cd5b8cc7f07a11f9361f93b
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Sun Sep 5 04:33:29 2010 +0200
s4/selftest: Fix path to include/config.h, set BUILDDIR automatically.
commit 851ad13047b7abe6cd0666c74984ddff37e5e096
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Sun Sep 5 03:16:48 2010 +0200
selftest: Cope with parentheses in testnames in --load-list.
commit 474c98fe263455f97f764195d44fb7b7406748b0
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Sun Sep 5 03:14:44 2010 +0200
selftest/subunit: Parse timestamps generated by upstream subunit.
commit ef9657017cf082bd49ed81f3df85a0fb1786f715
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Sun Sep 5 02:20:56 2010 +0200
selftest: Print out unmatched tests when using --load-list.
-----------------------------------------------------------------------
Summary of changes:
selftest/selftest.pl | 28 ++++++++++++++++++----------
selftest/subunithelper.py | 10 ++++++++--
source4/selftest/tests.sh | 5 ++++-
3 files changed, 30 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index cf79c83..00db951 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -694,12 +694,13 @@ foreach my $fn (@testlists) {
}
my $restricted = undef;
+my $restricted_used = {};
if ($opt_load_list) {
$restricted = [];
open(LOAD_LIST, "<$opt_load_list") or die("Unable to open $opt_load_list");
- while (<LOAD_LIST>) {
- chomp;
+ while (<LOAD_LIST>) {
+ chomp;
push (@$restricted, $_);
}
close(LOAD_LIST);
@@ -718,15 +719,16 @@ foreach my $testsuite (@available) {
Subunit::skip_testsuite($name, $skipreason);
} elsif (defined($restricted)) {
# Find the testsuite for this test
- my $match = 0;
+ my $match = undef;
foreach my $r (@$restricted) {
if ($r eq $name) {
$individual_tests->{$name} = [];
- $match = 1;
- }
- if ($r =~ /^$name\.(.*)$/) {
+ $match = $r;
+ $restricted_used->{$r} = 1;
+ } elsif (substr($r, $name, length($name)+1) eq "$name.") {
push(@{$individual_tests->{$name}}, $1);
- $match = 1;
+ $match = $r;
+ $restricted_used->{$r} = 1;
}
}
push(@todo, $testsuite) if ($match);
@@ -735,10 +737,16 @@ foreach my $testsuite (@available) {
}
}
-if ($#todo == -1) {
+if (defined($restricted)) {
+ foreach (@$restricted) {
+ unless (defined($restricted_used->{$_})) {
+ print "No test or testsuite found matching $_\n";
+ }
+ }
+} elsif ($#todo == -1) {
print STDERR "No tests to run\n";
exit(1);
- }
+}
my $suitestotal = $#todo + 1;
my $i = 0;
@@ -938,7 +946,7 @@ $envvarstr
$cmd =~ s/([\(\)])/\\$1/g;
my $name = $$_[0];
my $envname = $$_[1];
-
+
my $envvars = setup_env($envname);
if (not defined($envvars)) {
Subunit::skip_testsuite($name,
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py
index 06e1fc2..f5e07a1 100644
--- a/selftest/subunithelper.py
+++ b/selftest/subunithelper.py
@@ -45,8 +45,14 @@ def parse_results(msg_ops, statistics, fh):
elif command == "time":
msg_ops.control_msg(l)
grp = re.match(
- "(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)\n", arg)
- msg_ops.report_time(time.mktime((int(grp.group(1)), int(grp.group(2)), int(grp.group(3)), int(grp.group(4)), int(grp.group(5)), int(grp.group(6)), 0, 0, 0)))
+ '(\d+)-(\d+)-(\d+) (\d+):(\d+):([.0-9]+)\n', arg)
+ if grp is None:
+ grp = re.match(
+ '(\d+)-(\d+)-(\d+) (\d+):(\d+):([.0-9]+)Z\n', arg)
+ if grp is None:
+ print "Unable to parse time line: %s" % arg
+ if grp is not None:
+ msg_ops.report_time(time.mktime((int(grp.group(1)), int(grp.group(2)), int(grp.group(3)), int(grp.group(4)), int(grp.group(5)), int(float(grp.group(6))), 0, 0, 0)))
elif command in VALID_RESULTS:
msg_ops.control_msg(l)
result = command
diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index 0341d3e..6ed631b 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -95,6 +95,9 @@ plansmbtorturetestsuite() {
}
samba4srcdir="`dirname $0`/.."
+if [ -z "$BUILDDIR" ]; then
+ BUILDDIR="$samba4srcdir"
+fi
samba4bindir="$BUILDDIR/bin"
smb4torture="$samba4bindir/smbtorture${EXEEXT}"
if which tap2subunit 2>/dev/null; then
@@ -134,7 +137,7 @@ for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD -
done
# see if we support ldaps
[ -n "$CONFIG_H" ] || {
- CONFIG_H="include/config.h"
+ CONFIG_H="$samba4bindir/default/source4/include/config.h"
}
if grep ENABLE_GNUTLS.1 $CONFIG_H > /dev/null; then
for options in "" "-U\$USERNAME%\$PASSWORD"; do
--
Samba Shared Repository
More information about the samba-cvs
mailing list