mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
python:tests: Use bin/tdbdump only if built
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
667335a42d
commit
84a7baeef3
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user