2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

Move sockcreator.py to lib

It caused trouble here, maybe this helps
This commit is contained in:
Michal 'vorner' Vaner
2011-08-03 16:50:59 +02:00
parent c5124556a1
commit 3cebb4e770
10 changed files with 42 additions and 12 deletions

View File

@@ -839,6 +839,8 @@ AC_CONFIG_FILES([Makefile
src/lib/python/isc/notify/Makefile
src/lib/python/isc/notify/tests/Makefile
src/lib/python/isc/testutils/Makefile
src/lib/python/isc/bind10/Makefile
src/lib/python/isc/bind10/tests/Makefile
src/lib/config/Makefile
src/lib/config/tests/Makefile
src/lib/config/tests/testdata/Makefile
@@ -907,7 +909,6 @@ AC_OUTPUT([doc/version.ent
src/bin/bind10/bind10_src.py
src/bin/bind10/run_bind10.sh
src/bin/bind10/tests/bind10_test.py
src/bin/bind10/tests/sockcreator_test.py
src/bin/bindctl/run_bindctl.sh
src/bin/bindctl/bindctl_main.py
src/bin/bindctl/tests/bindctl_test

View File

@@ -1,11 +1,7 @@
SUBDIRS = . tests
sbin_SCRIPTS = bind10
CLEANFILES = bind10 bind10_src.pyc bind10_messages.py bind10_messages.pyc \
sockcreator.pyc
python_PYTHON = __init__.py sockcreator.py
pythondir = $(pyexecdir)/bind10
CLEANFILES = bind10 bind10_src.pyc bind10_messages.py bind10_messages.pyc
pkglibexecdir = $(libexecdir)/@PACKAGE@
pyexec_DATA = bind10_messages.py

View File

@@ -67,7 +67,7 @@ import isc.util.process
import isc.net.parse
import isc.log
from bind10_messages import *
import bind10.sockcreator
import isc.bind10.sockcreator
isc.log.init("b10-boss")
logger = isc.log.Logger("boss")
@@ -337,8 +337,8 @@ class BoB:
def start_creator(self):
self.curproc = 'b10-sockcreator'
self.sockcreator = bind10.sockcreator.Creator("@@LIBEXECDIR@@:" +
os.environ['PATH'])
self.sockcreator = isc.bind10.sockcreator.Creator("@@LIBEXECDIR@@:" +
os.environ['PATH'])
def stop_creator(self, kill=False):
if self.sockcreator is None:

View File

@@ -1,7 +1,7 @@
PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
#PYTESTS = args_test.py bind10_test.py
# NOTE: this has a generated test found in the builddir
PYTESTS = bind10_test.py sockcreator_test.py
PYTESTS = bind10_test.py
# If necessary (rare cases), explicitly specify paths to dynamic libraries
# required by loadable python modules.

View File

@@ -1,4 +1,4 @@
SUBDIRS = datasrc cc config log net notify util testutils acl
SUBDIRS = datasrc cc config log net notify util testutils acl bind10
python_PYTHON = __init__.py

View File

@@ -0,0 +1,4 @@
SUBDIRS = . tests
python_PYTHON = __init__.py sockcreator.py
pythondir = $(pyexecdir)/isc/bind10

View File

@@ -0,0 +1,29 @@
PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
#PYTESTS = args_test.py bind10_test.py
# NOTE: this has a generated test found in the builddir
PYTESTS = sockcreator_test.py
EXTRA_DIST = $(PYTESTS)
# If necessary (rare cases), explicitly specify paths to dynamic libraries
# required by loadable python modules.
LIBRARY_PATH_PLACEHOLDER =
if SET_ENV_LIBRARY_PATH
LIBRARY_PATH_PLACEHOLDER += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/cc/.libs:$(abs_top_builddir)/src/lib/config/.libs:$(abs_top_builddir)/src/lib/log/.libs:$(abs_top_builddir)/src/lib/util/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$(abs_top_builddir)/src/lib/util/io/.libs:$$$(ENV_LIBRARY_PATH)
endif
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
if ENABLE_PYTHON_COVERAGE
touch $(abs_top_srcdir)/.coverage
rm -f .coverage
${LN_S} $(abs_top_srcdir)/.coverage .coverage
endif
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
$(LIBRARY_PATH_PLACEHOLDER) \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_srcdir)/src/bin:$(abs_top_builddir)/src/bin/bind10:$(abs_top_builddir)/src/lib/util/io/.libs \
BIND10_MSGQ_SOCKET_FILE=$(abs_top_builddir)/msgq_socket \
$(PYCOVERAGE_RUN) $(abs_srcdir)/$$pytest || exit ; \
done

View File

@@ -26,7 +26,7 @@ import socket
from isc.net.addr import IPAddr
import isc.log
from libutil_io_python import send_fd
from bind10.sockcreator import Parser, CreatorError, WrappedSocket
from isc.bind10.sockcreator import Parser, CreatorError, WrappedSocket
class FakeCreator:
"""