Commit cd373315 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[1704] Use @abs_top_builddir@ directly in the .py.in file instead of using an env variable

parent 277be10c
......@@ -23,7 +23,6 @@ endif
chmod +x $(abs_builddir)/$$pytest ; \
$(LIBRARY_PATH_PLACEHOLDER) \
PYTHONPATH=$(COMMON_PYTHON_PATH):$(abs_top_srcdir)/src/bin:$(abs_top_builddir)/src/bin/bind10:$(abs_top_builddir)/src/lib/util/io/.libs \
LOCKFILE_TESTPATH=$(abs_top_builddir)/src/bin/bind10/tests/lockfile_test \
BIND10_MSGQ_SOCKET_FILE=$(abs_top_builddir)/msgq_socket \
$(PYCOVERAGE_RUN) $(abs_builddir)/$$pytest || exit ; \
done
......@@ -1465,13 +1465,14 @@ class SocketSrvTest(unittest.TestCase):
class TestFunctions(unittest.TestCase):
def setUp(self):
if not os.path.isdir(os.environ["LOCKFILE_TESTPATH"]):
os.mkdir(os.environ["LOCKFILE_TESTPATH"])
self.assertTrue(os.path.isdir(os.environ["LOCKFILE_TESTPATH"]))
self.lockfile_testpath = "@abs_top_builddir@/src/bin/bind10/tests/lockfile_test"
if not os.path.isdir(self.lockfile_testpath):
os.mkdir(self.lockfile_testpath)
self.assertTrue(os.path.isdir(self.lockfile_testpath))
def tearDown(self):
os.rmdir(os.environ["LOCKFILE_TESTPATH"])
self.assertFalse(os.path.isdir(os.environ["LOCKFILE_TESTPATH"]))
os.rmdir(self.lockfile_testpath)
self.assertFalse(os.path.isdir(self.lockfile_testpath))
def test_remove_lock_files(self):
if "B10_FROM_BUILD" in os.environ:
......@@ -1479,7 +1480,7 @@ class TestFunctions(unittest.TestCase):
else:
oldenv = None
os.environ["B10_FROM_BUILD"] = os.environ["LOCKFILE_TESTPATH"]
os.environ["B10_FROM_BUILD"] = self.lockfile_testpath
# create lockfiles for the testcase
lockfiles = ["logger_lockfile"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment