[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Fri Oct 17 12:21:01 MDT 2014
The branch, master has been updated
via f3841b9 selftest: add documentation for options --exclude and --include that weren't documented before
via bdfcee6 selftest: report the 10 slowest tests (by default) make the number configurable
via 4055eb6 scripts: Allow to specify a limit on the number of tests reported
from 14b5eb9 ntlm_auth: Allow the --option parameter to work against ntlm_auth
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f3841b9a0fa6c9eff9f1245b91c5210bd7d533ae
Author: Matthieu Patou <mat at matws.net>
Date: Sun Oct 12 20:59:02 2014 -0700
selftest: add documentation for options --exclude and --include that weren't documented before
Change-Id: Ibf0fa1c548d376dc8d68ab8136e2532f67dd1d8a
Signed-off-by: Matthieu Patou <mat at matws.net>
Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Fri Oct 17 20:20:12 CEST 2014 on sn-devel-104
commit bdfcee6b8e457b8f5ecd0931e4cfb0473e4d78b3
Author: Matthieu Patou <mat at matws.net>
Date: Sun Oct 12 17:57:20 2014 -0700
selftest: report the 10 slowest tests (by default) make the number configurable
Change-Id: Ib1cf50199d110827a25cf198b40738f3c72cbe17
Signed-off-by: Matthieu Patou <mat at matws.net>
Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
commit 4055eb6b7dbd845cfc431a2cf7f1867240046fdf
Author: Matthieu Patou <mat at matws.net>
Date: Sun Oct 12 17:56:10 2014 -0700
scripts: Allow to specify a limit on the number of tests reported
This allows to report the 10 most slowest for instance.
Change-Id: I987520dbc28f598221c47df314d823f916312aab
Signed-off-by: Matthieu Patou <mat at matws.net>
Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
-----------------------------------------------------------------------
Summary of changes:
script/show_testsuite_time | 10 ++++++++--
selftest/selftest.pl | 2 ++
selftest/wscript | 10 ++++++++++
3 files changed, 20 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/script/show_testsuite_time b/script/show_testsuite_time
index 4015321..13ae0b6 100755
--- a/script/show_testsuite_time
+++ b/script/show_testsuite_time
@@ -9,11 +9,16 @@ my $start=0;
my $end=0;
my %hash;
my $fh;
+my $max=0;
if ($#ARGV >= 0) {
open($fh, "<", $ARGV[0]) || die "can't open ".$ARGV[0];
} else {
$fh = $in;
}
+if ($#ARGV >= 1) {
+ $max = $ARGV[1];
+}
+
while(<$fh>)
{
if (m/^testsuite: (.*)/) {
@@ -34,7 +39,8 @@ while(<$fh>)
}
}
}
-my @sorted = sort { $hash{$a}<=>$hash{$b} } keys(%hash);
-for my $l (@sorted) {
+my @sorted = sort { $hash{$b}<=>$hash{$a} } keys(%hash);
+$max = $#sorted unless $max or ($max < $#sorted);
+for my $l (@sorted[0..($max - 1)]) {
print $l."\n";
}
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 2df5092..7dde5b2 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -190,6 +190,8 @@ Generic options:
--help this help page
--target=samba[3]|win Samba version to target
--testlist=FILE file to read available tests from
+ --exclude=FILE Exclude tests listed in the file
+ --include=FILE Include tests listed in the file
Paths:
--prefix=DIR prefix to run tests in [st]
diff --git a/selftest/wscript b/selftest/wscript
index 7c6d3d7..e5df412 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -45,6 +45,9 @@ def set_options(opt):
gr.add_option('--slow',
help=("enable the really slow tests"),
action="store_true", dest='SLOWTEST', default=False)
+ gr.add_option('--nb-slowest',
+ help=("Show the n slowest tests (default=10)"),
+ type=int, default=10, dest='NB_SLOWEST')
gr.add_option('--testenv',
help=("start a terminal with the test environment setup"),
action="store_true", dest='TESTENV', default=False)
@@ -232,6 +235,13 @@ def cmd_testonly(opt):
runcmd = EXPAND_VARIABLES(opt, testrcmd)
RUN_COMMAND(runcmd, env=env)
+ if os.path.exists("st/subunit"):
+ nb = Options.options.NB_SLOWEST
+ print "TOP %d slowest tests" % nb
+ cmd = "./script/show_testsuite_time %s/subunit %d" % (Options.options.SELFTEST_PREFIX, nb)
+ runcmd = EXPAND_VARIABLES(opt, cmd)
+ RUN_COMMAND(runcmd, env=env)
+
if ret != 0:
print("ERROR: test failed with exit code %d" % ret)
sys.exit(ret)
--
Samba Shared Repository
More information about the samba-cvs
mailing list