[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Thu Oct 30 15:46:02 MDT 2014
The branch, master has been updated
via f184d12 build: fix check for subunit file when selftest prefix is given
via 062289f script: fix display of ten slowest tests if < 10 tests are run.
via 6168ae0 script/show_testsuite_time: error out if number argument is not a decimal number
via 594ffee s3:loadparm: fix a comment typo
via 331f980 selftest: only use Options.options.SELFTEST_PREFIX if it's not the default
from 3535649 selftest: Fake the hostname.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f184d12e5e8f040ca779f36cfff5ea29c9e0de24
Author: Michael Adam <obnox at samba.org>
Date: Mon Oct 27 23:24:28 2014 +0100
build: fix check for subunit file when selftest prefix is given
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Thu Oct 30 22:45:45 CET 2014 on sn-devel-104
commit 062289f0f896af85671adad09a9a2afc027be570
Author: Michael Adam <obnox at samba.org>
Date: Mon Oct 27 12:35:12 2014 +0100
script: fix display of ten slowest tests if < 10 tests are run.
Note: $#array is the biggest index in an array in perl.
@array evaluated in scalar context is the number of elements.
Hence scalar(@array) = 1 + $#array
Or equivalently: 0 + @array = 1 + $#array
... :-)
Apart from this off-by-one error, the "unless" clause to trigger
the capping of the number of tests listed was wrong. Hence if
less then 10 tests were run, a number of blank lines were appended.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 6168ae0b870e847417af39f3e007dc583315ffdf
Author: Michael Adam <obnox at samba.org>
Date: Mon Oct 27 23:29:25 2014 +0100
script/show_testsuite_time: error out if number argument is not a decimal number
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 594ffeedfc1e51e8ce7495f762c4e3fd50287af6
Author: Michael Adam <obnox at samba.org>
Date: Wed Oct 29 18:14:17 2014 +0100
s3:loadparm: fix a comment typo
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Ralph Böhme <slow at samba.org>
commit 331f9805ea6743ab130af719733cf51b3ddf12fb
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Oct 22 10:08:17 2014 +0200
selftest: only use Options.options.SELFTEST_PREFIX if it's not the default
The --with-selftest-prefix option is typically specified as argument
to './configure' ! Overwriting it for 'waf testonly' should only
happen with an explicit 'waf testonly --with-selftest-prefix=/some/path'.
This fixes a regression introduced by
commit edc1cedf932de2bc068da9a5db844ac4c48f4324
(selftest: Actually honor --with-selftest-prefix).
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
-----------------------------------------------------------------------
Summary of changes:
script/show_testsuite_time | 5 ++++-
selftest/wscript | 14 +++++++++-----
source3/param/loadparm.c | 2 +-
3 files changed, 14 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/script/show_testsuite_time b/script/show_testsuite_time
index 13ae0b6..fb9ea2f 100755
--- a/script/show_testsuite_time
+++ b/script/show_testsuite_time
@@ -17,6 +17,9 @@ if ($#ARGV >= 0) {
}
if ($#ARGV >= 1) {
$max = $ARGV[1];
+ if ($max =~ /\D/) {
+ die "not a decimal number: '$max'";
+ }
}
while(<$fh>)
@@ -40,7 +43,7 @@ while(<$fh>)
}
}
my @sorted = sort { $hash{$b}<=>$hash{$a} } keys(%hash);
-$max = $#sorted unless $max or ($max < $#sorted);
+$max = @sorted if (($max <= 0) or ($max > @sorted));
for my $l (@sorted[0..($max - 1)]) {
print $l."\n";
}
diff --git a/selftest/wscript b/selftest/wscript
index e5df412..fd92531 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -8,6 +8,8 @@ from samba_utils import *
from samba_autoconf import *
import types
+DEFAULT_SELFTEST_PREFIX="./st"
+
def set_options(opt):
opt.add_option('--enable-selftest',
@@ -19,8 +21,8 @@ def set_options(opt):
action="store_true", dest='enable_coverage', default=False)
opt.add_option('--with-selftest-prefix',
help=("specify location of selftest directory "
- "(default=./st)"),
- action="store", dest='SELFTEST_PREFIX', default='./st')
+ "(default=%s)" % DEFAULT_SELFTEST_PREFIX),
+ action="store", dest='SELFTEST_PREFIX', default=DEFAULT_SELFTEST_PREFIX)
opt.ADD_COMMAND('test', cmd_test)
opt.ADD_COMMAND('testonly', cmd_testonly)
@@ -94,7 +96,8 @@ def cmd_testonly(opt):
env = LOAD_ENVIRONMENT()
opt.env = env
- env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX
+ if Options.options.SELFTEST_PREFIX != DEFAULT_SELFTEST_PREFIX:
+ env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX
if (not CONFIG_SET(opt, 'NSS_WRAPPER') or
not CONFIG_SET(opt, 'UID_WRAPPER') or
@@ -235,10 +238,11 @@ def cmd_testonly(opt):
runcmd = EXPAND_VARIABLES(opt, testrcmd)
RUN_COMMAND(runcmd, env=env)
- if os.path.exists("st/subunit"):
+ subunit_file = "%s/subunit" % env.SELFTEST_PREFIX
+ if os.path.exists(subunit_file):
nb = Options.options.NB_SLOWEST
print "TOP %d slowest tests" % nb
- cmd = "./script/show_testsuite_time %s/subunit %d" % (Options.options.SELFTEST_PREFIX, nb)
+ cmd = "./script/show_testsuite_time %s %d" % (subunit_file, nb)
runcmd = EXPAND_VARIABLES(opt, cmd)
RUN_COMMAND(runcmd, env=env)
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 52ffbcc..f68c001 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3954,7 +3954,7 @@ int lp_servicenumber(const char *pszServiceName)
for (iService = iNumServices - 1; iService >= 0; iService--) {
if (VALID(iService) && ServicePtrs[iService]->szService) {
/*
- * The substitution here is used to support %U is
+ * The substitution here is used to support %U in
* service names
*/
fstrcpy(serviceName, ServicePtrs[iService]->szService);
--
Samba Shared Repository
More information about the samba-cvs
mailing list