From: Mukund Sivaraman Date: Mon, 28 May 2012 05:40:40 +0000 (+0530) Subject: [1704] Use @abs_top_builddir@ directly in the .py.in file instead of using an env... X-Git-Tag: trac2351_base~226^2~60^2^2~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd373315919dd5a20440d27d49c3c0e47ebb3f19;p=thirdparty%2Fkea.git [1704] Use @abs_top_builddir@ directly in the .py.in file instead of using an env variable --- diff --git a/src/bin/bind10/tests/Makefile.am b/src/bin/bind10/tests/Makefile.am index 82958af82c..d54ee56be1 100644 --- a/src/bin/bind10/tests/Makefile.am +++ b/src/bin/bind10/tests/Makefile.am @@ -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 diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in index 9e1353c652..5a6ab088ed 100644 --- a/src/bin/bind10/tests/bind10_test.py.in +++ b/src/bin/bind10/tests/bind10_test.py.in @@ -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"]