diff options
Diffstat (limited to '')
-rw-r--r-- | test/unit/main.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/unit/main.py b/test/unit/main.py index 2ab0626b..bd91026f 100644 --- a/test/unit/main.py +++ b/test/unit/main.py @@ -142,7 +142,7 @@ class TestUnit(unittest.TestCase): subprocess.check_output(['which', 'openssl']) output = subprocess.check_output( - [self.pardir + '/build/unitd', '--version'], + [self.unitd, '--version'], stderr=subprocess.STDOUT, ) @@ -170,6 +170,11 @@ class TestUnit(unittest.TestCase): self._stop() def _run(self): + self.unitd = self.pardir + '/build/unitd' + + if not os.path.isfile(self.unitd): + exit("Could not find unit") + self.testdir = tempfile.mkdtemp(prefix='unit-test-') os.mkdir(self.testdir + '/state') @@ -179,7 +184,7 @@ class TestUnit(unittest.TestCase): def _run_unit(): subprocess.call( [ - self.pardir + '/build/unitd', + self.unitd, '--no-daemon', '--modules', self.pardir + '/build', '--state', self.testdir + '/state', |