Commit 9b95e643 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2964] distcheck fix: use a local copy of datasrc.spec for tests.

parent 53d462ae
......@@ -9,6 +9,14 @@ if SET_ENV_LIBRARY_PATH
LIBRARY_PATH_PLACEHOLDER += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/cryptolink/.libs:$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/dns/python/.libs:$(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/util/threads/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$(abs_top_builddir)/src/lib/datasrc/.libs:$$$(ENV_LIBRARY_PATH)
endif
# We use our own "default" datasrc.spec, tweaking some installation path,
# so we can run the tests with something very close to the actual spec and
# yet independent from installation environment.
BUILT_SOURCES = datasrc.spec
datasrc.spec: $(abs_top_builddir)/src/bin/cfgmgr/plugins/datasrc.spec.pre
$(SED) -e "s|@@STATIC_ZONE_FILE@@|$(abs_top_builddir)/src/lib/datasrc/static.zone|;s|@@SQLITE3_DATABASE_FILE@@|$(abs_builddir)/zone.sqlite3|" $(abs_top_builddir)/src/bin/cfgmgr/plugins/datasrc.spec.pre >$@
CLEANFILES = datasrc.spec zone.sqlite3
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
if ENABLE_PYTHON_COVERAGE
......
......@@ -20,8 +20,9 @@ import unittest
import isc.config
import os
# A (slightly tweaked) local copy of the default data source spec
DATASRC_SPECFILE = os.environ["B10_FROM_BUILD"] + \
"/src/bin/cfgmgr/plugins/datasrc.spec"
"/src/lib/python/isc/server_common/tests/datasrc.spec"
DEFAULT_CONFIG = \
isc.config.ConfigData(isc.config.module_spec_from_file(DATASRC_SPECFILE)).\
get_full_config()
......
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