Commit 5c10d34b authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

This is for ticket #153.

Moved msgq tests to own directory.

Added targets for all known python unittests.
Note this is for those that use the unittest module.
Other tests are ignored for now.

These tests are ran using "make check" even if not built
with gtest.

Some of these tests fail. I will comment them out in later commit.


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac153@1753 e5f2f494-b856-4b98-b285-d166d9295462
parent aa496085
......@@ -361,16 +361,22 @@ AC_CONFIG_FILES([Makefile
src/Makefile
src/bin/Makefile
src/bin/bind10/Makefile
src/bin/bind10/tests/Makefile
src/bin/cmdctl/Makefile
src/bin/cmdctl/tests/Makefile
src/bin/bindctl/Makefile
src/bin/bindctl/tests/Makefile
src/bin/cfgmgr/Makefile
src/bin/host/Makefile
src/bin/loadzone/Makefile
src/bin/msgq/Makefile
src/bin/msgq/tests/Makefile
src/bin/auth/Makefile
src/bin/auth/tests/Makefile
src/bin/xfrin/Makefile
src/bin/xfrin/tests/Makefile
src/bin/xfrout/Makefile
src/bin/xfrout/tests/Makefile
src/bin/usermgr/Makefile
src/lib/Makefile
src/lib/cc/Makefile
......@@ -378,7 +384,9 @@ AC_CONFIG_FILES([Makefile
src/lib/python/isc/Makefile
src/lib/python/isc/auth/Makefile
src/lib/python/isc/cc/Makefile
src/lib/python/isc/cc/tests/Makefile
src/lib/python/isc/config/Makefile
src/lib/python/isc/config/tests/Makefile
src/lib/config/Makefile
src/lib/config/tests/Makefile
src/lib/dns/Makefile
......@@ -411,7 +419,7 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
src/bin/usermgr/run_b10-cmdctl-usermgr.sh
src/bin/usermgr/b10-cmdctl-usermgr.py
src/bin/msgq/msgq.py
src/bin/msgq/msgq_test
src/bin/msgq/tests/msgq_test
src/bin/msgq/run_msgq.sh
src/bin/auth/auth.spec.pre
src/bin/auth/spec_config.h
......@@ -433,7 +441,7 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
chmod +x src/bin/loadzone/run_loadzone.sh
chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
chmod +x src/bin/msgq/run_msgq.sh
chmod +x src/bin/msgq/msgq_test
chmod +x src/bin/msgq/tests/msgq_test
chmod +x src/lib/dns/gen-rdatacode.py
chmod +x src/lib/dns/tests/testdata/gen-wiredata.py
])
......
SUBDIRS = tests
sbin_SCRIPTS = bind10
CLEANFILES = bind10
......@@ -8,7 +10,7 @@ bind10_DATA = bob.spec
EXTRA_DIST = bob.spec
man_MANS = bind10.8
EXTRA_DIST += $(man_MANS) bind10.xml tests/bind10_test.py
EXTRA_DIST += $(man_MANS) bind10.xml
if ENABLE_MAN
......
PYTESTS = bind10_test.py
EXTRA_DIST = $(PYTESTS)
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_srcdir)/src/bin/bind10 \
$(PYCOVERAGE) $$pytest ; \
done
SUBDIRS = tests
bin_SCRIPTS = bindctl
man_MANS = bindctl.1
......@@ -9,7 +11,6 @@ pythondir = $(pyexecdir)/bindctl
bindctldir = $(DESTDIR)$(pkgdatadir)
bindctl_DATA = bindctl.pem
EXTRA_DIST += bindctl.pem
EXTRA_DIST += tests/bindctl_test.py
CLEANFILES = bindctl
......
PYTESTS = bindctl_test.py
EXTRA_DIST = $(PYTESTS)
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_srcdir)/src/bin \
$(PYCOVERAGE) $$pytest ; \
done
SUBDIRS = tests
pkglibexecdir = $(libexecdir)/@PACKAGE@
pkglibexec_SCRIPTS = b10-cmdctl
......@@ -16,7 +18,6 @@ b10_cmdctl_DATA += cmdctl.spec
EXTRA_DIST = $(CMDCTL_CONFIGURATIONS)
EXTRA_DIST += cmdctl.spec
EXTRA_DIST += tests/cmdctl_test.py
CLEANFILES= b10-cmdctl
......
PYTESTS = cmdctl_test.py
EXTRA_DIST = $(PYTESTS)
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_srcdir)/src/bin/cmdctl \
$(PYCOVERAGE) $$pytest ; \
done
SUBDIRS = tests
pkglibexecdir = $(libexecdir)/@PACKAGE@
pkglibexec_SCRIPTS = b10-msgq
......@@ -5,7 +7,7 @@ pkglibexec_SCRIPTS = b10-msgq
CLEANFILES = msgq
man_MANS = b10-msgq.8
EXTRA_DIST = $(man_MANS) msgq.xml msgq_test.py
EXTRA_DIST = $(man_MANS) msgq.xml
if ENABLE_MAN
......
PYTESTS = msgq_test.py
EXTRA_DIST = $(PYTESTS)
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/bin/msgq:$(abs_top_srcdir)/src/lib/python \
$(PYCOVERAGE) $$pytest ; \
done
......@@ -18,9 +18,9 @@
PYTHON_EXEC=${PYTHON_EXEC:-@PYTHON@}
export PYTHON_EXEC
MYPATH_PATH=@abs_top_srcdir@/src/bin/msgq
MYPATH_PATH=@abs_top_srcdir@/src/bin/msgq/tests
PYTHONPATH=@abs_top_srcdir@/src/lib/python
PYTHONPATH=@abs_top_srcdir@/src/bin/msgq:@abs_top_srcdir@/src/lib/python
export PYTHONPATH
......
SUBDIRS = tests
pkglibexecdir = $(libexecdir)/@PACKAGE@
pkglibexec_SCRIPTS = b10-xfrin
......@@ -9,7 +11,6 @@ CLEANFILES = b10-xfrin xfrin.spec
man_MANS = b10-xfrin.8
EXTRA_DIST = $(man_MANS) b10-xfrin.xml
EXTRA_DIST += tests/xfrin_test.py
if ENABLE_MAN
......
if HAVE_BOOST_PYTHON
PYTESTS = xfrin_test.py
EXTRA_DIST = $(PYTESTS)
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/dns/.libs:$(abs_top_srcdir)/src/bin/xfrin:$(abs_top_srcdir)/src/lib/python \
$(PYCOVERAGE) $$pytest ; \
done
endif
SUBDIRS = tests
pkglibexecdir = $(libexecdir)/@PACKAGE@
pkglibexec_SCRIPTS = b10-xfrout
......@@ -7,8 +9,6 @@ b10_xfrout_DATA = xfrout.spec
CLEANFILES= b10-xfrout xfrout.spec
EXTRA_DIST = tests/xfrout_test.py
xfrout.spec: xfrout.spec.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" xfrout.spec.pre >$@
......
PYTESTS = xfrout_test.py
EXTRA_DIST = $(PYTESTS)
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/bin/xfrout:$(abs_top_srcdir)/src/lib/python:$(abs_top_srcdir)/src/lib/dns/.libs:$(abs_top_srcdir)/src/lib/xfr/.libs \
$(PYCOVERAGE) $$pytest ; \
done
SUBDIRS = tests
python_PYTHON = __init__.py data.py session.py message.py
pythondir = $(pyexecdir)/isc/cc
EXTRA_DIST = tests/data_test.py
EXTRA_DIST += tests/sendcmd.py
EXTRA_DIST += tests/session_test.py
EXTRA_DIST += tests/test.py
EXTRA_DIST += tests/test_session.py
#PYTESTS = data_test.py session_test.py test.py
PYTESTS = data_test.py session_test.py
# NOTE: test_session.py is to be run manually, so not automated.
EXTRA_DIST = $(PYTESTS)
EXTRA_DIST += sendcmd.py
EXTRA_DIST += test_session.py
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python \
$(PYCOVERAGE) $$pytest ; \
done
SUBDIRS = tests
python_PYTHON = __init__.py ccsession.py cfgmgr.py config_data.py module_spec.py
pythondir = $(pyexecdir)/isc/config
EXTRA_DIST = tests/ccsession_test.py
EXTRA_DIST += tests/cfgmgr_test.py
EXTRA_DIST += tests/config_data_test.py
EXTRA_DIST += tests/module_spec_test.py
EXTRA_DIST += tests/unittest_fakesession.py
PYTESTS = ccsession_test.py cfgmgr_test.py config_data_test.py
PYTESTS += module_spec_test.py
EXTRA_DIST = $(PYTESTS)
EXTRA_DIST += unittest_fakesession.py
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python \
CONFIG_TESTDATA_PATH=$(abs_top_srcdir)/src/lib/config/testdata \
$(PYCOVERAGE) $$pytest ; \
done
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