diff --git a/src/lib/python/isc/datasrc/tests/Makefile.am b/src/lib/python/isc/datasrc/tests/Makefile.am index a86c2b467a..bef3b60c82 100644 --- a/src/lib/python/isc/datasrc/tests/Makefile.am +++ b/src/lib/python/isc/datasrc/tests/Makefile.am @@ -34,6 +34,11 @@ if ENABLE_PYTHON_COVERAGE touch $(abs_top_srcdir)/.coverage rm -f .coverage ${LN_S} $(abs_top_srcdir)/.coverage .coverage +endif +if USE_SHARED_MEMORY +HAVE_SHARED_MEMORY=yes +else +HAVE_SHARED_MEMORY=no endif for pytest in $(PYTESTS) ; do \ echo Running test: $$pytest ; \ @@ -41,6 +46,7 @@ endif PYTHONPATH=:$(COMMON_PYTHON_PATH):$(abs_top_builddir)/src/lib/python/isc/log:$(abs_top_builddir)/src/lib/python/isc/datasrc/.libs:$(abs_top_builddir)/src/lib/dns/python/.libs \ TESTDATA_PATH=$(abs_srcdir)/testdata \ TESTDATA_WRITE_PATH=$(abs_builddir) \ + HAVE_SHARED_MEMORY=$(HAVE_SHARED_MEMORY) \ GLOBAL_TESTDATA_PATH=$(abs_top_srcdir)/src/lib/testutils/testdata \ B10_FROM_BUILD=$(abs_top_builddir) \ $(PYCOVERAGE_RUN) $(abs_srcdir)/$$pytest || exit ; \ diff --git a/src/lib/python/isc/datasrc/tests/clientlist_test.py b/src/lib/python/isc/datasrc/tests/clientlist_test.py index a88e19c666..51d74b7af9 100644 --- a/src/lib/python/isc/datasrc/tests/clientlist_test.py +++ b/src/lib/python/isc/datasrc/tests/clientlist_test.py @@ -170,6 +170,9 @@ class ClientListTest(unittest.TestCase): """ Test find on a mapped segment. """ + if os.environ['HAVE_SHARED_MEMORY'] != 'yes': + return + self.clist = isc.datasrc.ConfigurableClientList(isc.dns.RRClass.IN) self.clist.configure('''[{ "type": "MasterFiles",