mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
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>
This commit is contained in:
parent
e1ab7b6804
commit
95fc53a37b
@ -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,' +
|
||||
|
Loading…
x
Reference in New Issue
Block a user