summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-10-30 13:22:11 +0000
committerAndrew Bartlett <abartlet@samba.org>2018-11-14 05:07:17 +0100
commita5c8ab277b1fa75289ca6a7ee2c87e079b9a6b7d (patch)
tree1ef5b7c0032d4538a0607ee0f4427dd4bb91a211 /python
parent48cc8a4e3214a571b2917dc3b677b44cccfa7286 (diff)
downloadsamba-a5c8ab277b1fa75289ca6a7ee2c87e079b9a6b7d.tar.gz
python/samba/tests: Ensure samba_dnsupdate called with correct python version
We need to examine the contents of PYTHON env variable which should defined the python version to be used when running tests. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index 66067fcf8b9..d79fcfbb997 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -384,8 +384,9 @@ class BlackboxTestCase(TestCaseInTempDir):
cmd = parts[0]
exe = os.path.join(BINDIR, cmd)
if os.path.exists(exe):
+ python_cmds = ["samba-tool", "samba_dnsupdate"]
parts[0] = exe
- if cmd =='samba-tool' and os.getenv("PYTHON", None):
+ if cmd in python_cmds and os.getenv("PYTHON", None):
parts.insert(0, os.environ["PYTHON"])
if not isinstance(line, list):