From 84a7baeef30a41d51eff8e6486ed67ed3318b115 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 22 Nov 2017 16:53:52 +0100 Subject: [PATCH] python:tests: Use bin/tdbdump only if built Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- python/samba/tests/registry.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.11.4.GIT