summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-11-22 16:53:52 +0100
committerAndrew Bartlett <abartlet@samba.org>2017-11-24 01:13:14 +0100
commit84a7baeef30a41d51eff8e6486ed67ed3318b115 (patch)
treec87370224f1710c94516ad1f1a582e45301186b3 /python
parent667335a42d683f73ec9c52c68730041d83a163a5 (diff)
downloadsamba-84a7baeef30a41d51eff8e6486ed67ed3318b115.tar.gz
python:tests: Use bin/tdbdump only if built
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/registry.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/samba/tests/registry.py b/python/samba/tests/registry.py
index 1a8a1266b82..f6af5f7bd15 100644
--- a/python/samba/tests/registry.py
+++ b/python/samba/tests/registry.py
@@ -56,7 +56,11 @@ class HiveTests(samba.tests.TestCaseInTempDir):
self.assertIsNone(self.hive.set_value('foo2', 1, 'bar2'))
self.assertIsNone(self.hive.flush())
- proc = Popen(['bin/tdbdump', self.hive_path], stdout=PIPE, stderr=PIPE)
+ tdbdump_tool = 'tdbdump'
+ if os.path.isfile('bin/tdbdump'):
+ tdbdump_tool = 'bin/tdbdump'
+
+ proc = Popen([tdbdump_tool, self.hive_path], stdout=PIPE, stderr=PIPE)
tdb_dump, err = proc.communicate()
self.assertTrue(b'DN=VALUE=FOO2,HIVE=NONE' in tdb_dump)