summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2013-01-03 14:34:13 -0800
committerMatthieu Patou <mat@samba.org>2013-01-21 08:21:20 +0100
commit95fc53a37b9c75cbc1d13432887de095ff779a1e (patch)
treeb84e805fba7a713e9cdcc1f353918f74cc771fba /selftest
parente1ab7b68043c1f459541838c2b839bc7cb117c19 (diff)
downloadsamba-95fc53a37b9c75cbc1d13432887de095ff779a1e.tar.gz
samba-95fc53a37b9c75cbc1d13432887de095ff779a1e.tar.bz2
samba-95fc53a37b9c75cbc1d13432887de095ff779a1e.zip
Tests: avoid adding python options that are functions in the env
This fix errors when running test --testenv --screen Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'selftest')
-rw-r--r--selftest/wscript7
1 files changed, 6 insertions, 1 deletions
diff --git a/selftest/wscript b/selftest/wscript
index 4733dc17cd..c7637a19ac 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -6,6 +6,7 @@
import Scripting, os, Options, Utils, Environment, optparse, sys
from samba_utils import *
from samba_autoconf import *
+import types
def set_options(opt):
@@ -114,7 +115,11 @@ def cmd_testonly(opt):
# put all command line options in the environment as TESTENV_*=*
for o in dir(Options.options):
if o[0:1] != '_':
- os.environ['TESTENV_%s' % o.upper()] = str(getattr(Options.options, o, ''))
+ val = getattr(Options.options, o, '')
+ if not issubclass(type(val), types.FunctionType) \
+ and not issubclass(type(val), types.MethodType):
+ os.environ['TESTENV_%s' % o.upper()] = str(getattr(Options.options, o, ''))
+
binary_mapping = ('nmblookup3:nmblookup,' +
'nmblookup4:nmblookup4,' +