Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
TESTS_ENVIRONMENT = \
TEST_DATA_DIR="$(abs_top_srcdir)/tests/data" \
+ TEST_STUB_ROOT="$(abs_top_builddir)/tests/stub/root" \
PAKFIRE_LOG=debug \
#PYTHONPATH="$(top_srcdir)/.libs:$(top_srcdir)/src" \
topdir="$(shell pwd)"
#!/usr/bin/python3
+import os
import pakfire
import unittest
This tests the execute command
"""
def setUp(self):
- self.pakfire = pakfire.Pakfire("/")
+ path = os.environ.get("TEST_STUB_ROOT")
+ if not path:
+ raise RuntimeError("TEST_STUB_ROOT is not defined")
+
+ self.pakfire = pakfire.Pakfire(path)
def test_execute(self):
r = self.pakfire.execute(["/usr/bin/sleep", "0"])