1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

selftest: Start using the binary mapping at the python layer as well

This commit is contained in:
Andrew Bartlett 2011-04-15 15:17:58 +10:00
parent 4fd6ebf544
commit 48bb69ef00
3 changed files with 12 additions and 2 deletions

View File

@ -30,9 +30,19 @@ def source4dir():
def bindir():
return os.path.normpath(os.getenv("BINDIR", "./bin"))
binary_mapping = {}
def binpath(name):
if name in binary_mapping:
name = binary_mapping[name]
return os.path.join(bindir(), "%s%s" % (name, os.getenv("EXEEXT", "")))
binary_mapping_string = os.getenv("BINARY_MAPPING", None)
if binary_mapping_string is not None:
for binmapping_entry in binary_mapping_string.split(','):
binmapping = binmapping_entry.split(':')
binary_mapping[binmapping[0]] = binmapping[1]
perl = os.getenv("PERL", "perl")
perl = perl.split()

View File

@ -25,7 +25,7 @@ import subprocess
samba4srcdir = source4dir()
samba4bindir = bindir()
smb4torture = binpath("smbtorture")
smb4torture = binpath("smbtorture4")
smb4torture_testsuite_list = subprocess.Popen([smb4torture, "--list-suites"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate("")[0].splitlines()
validate = os.getenv("VALIDATE", "")
if validate:

View File

@ -103,7 +103,7 @@ def cmd_testonly(opt):
if o[0:1] != '_':
os.environ['TESTENV_%s' % o.upper()] = str(getattr(Options.options, o, ''))
env.OPTIONS = ''
env.OPTIONS = '--binary-mapping=smbtorture4:smbtorture'
if not Options.options.SLOWTEST:
env.OPTIONS += ' --exclude=${srcdir}/source4/selftest/slow'
if Options.options.QUICKTEST: