diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-04-15 15:17:58 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-04-16 11:43:04 +0200 |
commit | 48bb69ef001be8270ddf145fa4884a2c5ddc2645 (patch) | |
tree | 870d5ba1a5ae10c4feb82a2b9810551fdf721285 | |
parent | 4fd6ebf544f90a6d18e6828eb3edc7b75f3b90a2 (diff) | |
download | samba-48bb69ef001be8270ddf145fa4884a2c5ddc2645.tar.gz samba-48bb69ef001be8270ddf145fa4884a2c5ddc2645.tar.bz2 samba-48bb69ef001be8270ddf145fa4884a2c5ddc2645.zip |
selftest: Start using the binary mapping at the python layer as well
-rw-r--r-- | selftest/selftesthelpers.py | 10 | ||||
-rwxr-xr-x | source4/selftest/tests.py | 2 | ||||
-rw-r--r-- | source4/selftest/wscript | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index 6467cbf0e0..085c62c466 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -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() diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index c4707b0886..dfbbc5752f 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -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: diff --git a/source4/selftest/wscript b/source4/selftest/wscript index 50acef8769..2bc2d4005b 100644 --- a/source4/selftest/wscript +++ b/source4/selftest/wscript @@ -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: |