diff options
author | Andreas Schneider <asn@samba.org> | 2017-11-22 16:53:52 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-11-24 01:13:14 +0100 |
commit | 84a7baeef30a41d51eff8e6486ed67ed3318b115 (patch) | |
tree | c87370224f1710c94516ad1f1a582e45301186b3 /python | |
parent | 667335a42d683f73ec9c52c68730041d83a163a5 (diff) | |
download | samba-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.py | 6 |
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) |