diff --git a/configure.ac b/configure.ac index e7ae484c0e..26ac86d1cc 100644 --- a/configure.ac +++ b/configure.ac @@ -448,7 +448,7 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py src/lib/python/isc/config/tests/config_test src/lib/python/isc/cc/tests/cc_test src/lib/dns/gen-rdatacode.py - src/lib/python/isc/cc/session.py + src/lib/python/isc_config.py src/lib/dns/tests/testdata/gen-wiredata.py src/lib/cc/session_config.h.pre ], [ diff --git a/src/bin/bind10/tests/Makefile.am b/src/bin/bind10/tests/Makefile.am index c003e069ee..d13993a3ee 100644 --- a/src/bin/bind10/tests/Makefile.am +++ b/src/bin/bind10/tests/Makefile.am @@ -7,6 +7,6 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/bin/bind10 \ + env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/bin/bind10 \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done diff --git a/src/bin/bindctl/tests/Makefile.am b/src/bin/bindctl/tests/Makefile.am index ecc931a544..e0ce57692f 100644 --- a/src/bin/bindctl/tests/Makefile.am +++ b/src/bin/bindctl/tests/Makefile.am @@ -7,6 +7,6 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_srcdir)/src/bin \ + env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_srcdir)/src/bin \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done diff --git a/src/bin/cmdctl/tests/Makefile.am b/src/bin/cmdctl/tests/Makefile.am index 0e120df491..79e8827648 100644 --- a/src/bin/cmdctl/tests/Makefile.am +++ b/src/bin/cmdctl/tests/Makefile.am @@ -7,6 +7,6 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/bin/cmdctl \ + env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/bin/cmdctl \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in index 6165a41bc5..65a7b2ae33 100644 --- a/src/bin/msgq/msgq.py.in +++ b/src/bin/msgq/msgq.py.in @@ -144,9 +144,7 @@ class MsgQ: if os.path.exists(self.socket_file): os.remove(self.socket_file) try: - print("[XX] SOCKET FILE: " + self.socket_file) self.listen_socket.bind(self.socket_file) - print("[XX] LISTENING ON SOCKET FILE: " + self.socket_file) self.listen_socket.listen(1024) except Exception as e: # remove the file again if something goes wrong diff --git a/src/bin/msgq/tests/Makefile.am b/src/bin/msgq/tests/Makefile.am index a97a422909..9abf774edd 100644 --- a/src/bin/msgq/tests/Makefile.am +++ b/src/bin/msgq/tests/Makefile.am @@ -7,7 +7,7 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_builddir)/src/bin/msgq:$(abs_top_srcdir)/src/lib/python \ + env PYTHONPATH=$(abs_top_builddir)/src/bin/msgq:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done diff --git a/src/bin/xfrin/tests/Makefile.am b/src/bin/xfrin/tests/Makefile.am index b1d2d2e04e..ce1fc18590 100644 --- a/src/bin/xfrin/tests/Makefile.am +++ b/src/bin/xfrin/tests/Makefile.am @@ -9,7 +9,7 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/bin/xfrin:$(abs_top_srcdir)/src/lib/python \ + env PYTHONPATH=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/bin/xfrin:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done diff --git a/src/bin/xfrout/tests/Makefile.am b/src/bin/xfrout/tests/Makefile.am index f1bc9cfe5c..cbdb5a8644 100644 --- a/src/bin/xfrout/tests/Makefile.am +++ b/src/bin/xfrout/tests/Makefile.am @@ -9,7 +9,7 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_builddir)/src/bin/xfrout:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/xfr/.libs \ + env PYTHONPATH=$(abs_top_builddir)/src/bin/xfrout:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/xfr/.libs \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done diff --git a/src/lib/python/isc/cc/session.py.in b/src/lib/python/isc/cc/session.py similarity index 96% rename from src/lib/python/isc/cc/session.py.in rename to src/lib/python/isc/cc/session.py index 07b54bba56..565db492c2 100644 --- a/src/lib/python/isc/cc/session.py.in +++ b/src/lib/python/isc/cc/session.py @@ -18,6 +18,7 @@ import socket import struct import os import threading +import isc_config import isc.cc.message @@ -26,11 +27,6 @@ class NetworkError(Exception): pass class SessionError(Exception): pass class Session: - SOCKET_FILE = os.path.join("@localstatedir@", - "@PACKAGE_NAME@", - "msgq_socket").replace("${prefix}", - "@prefix@") - def __init__(self, socket_file=None): self._socket = None self._lname = None @@ -45,7 +41,7 @@ class Session: if "BIND10_MSGQ_SOCKET_FILE" in os.environ: self.socket_file = os.environ["BIND10_MSGQ_SOCKET_FILE"] else: - self.socket_file = self.SOCKET_FILE + self.socket_file = isc_config.BIND10_MSGQ_SOCKET_FILE else: self.socket_file = socket_file diff --git a/src/lib/python/isc/cc/tests/Makefile.am b/src/lib/python/isc/cc/tests/Makefile.am index c46ed3fe6f..0828520ba2 100644 --- a/src/lib/python/isc/cc/tests/Makefile.am +++ b/src/lib/python/isc/cc/tests/Makefile.am @@ -10,6 +10,6 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_srcdir)/src/lib/python \ + env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done diff --git a/src/lib/python/isc/config/tests/Makefile.am b/src/lib/python/isc/config/tests/Makefile.am index dc43747a9d..18d378b15b 100644 --- a/src/lib/python/isc/config/tests/Makefile.am +++ b/src/lib/python/isc/config/tests/Makefile.am @@ -9,7 +9,7 @@ PYCOVERAGE = $(PYTHON) check-local: for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ - env PYTHONPATH=$(abs_top_srcdir)/src/lib/python \ + env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \ CONFIG_TESTDATA_PATH=$(abs_top_srcdir)/src/lib/config/testdata \ $(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \ done