Commit 10553ed4 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[1150] Fix generated/nongenerated tests

The folder contains both generated and directly written files, so we
need to handle them separately, because of when we have different
builddir than srcdir.
parent 43da3c6c
PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
PYTESTS_GEN = log_test.py
noinst_SCRIPTS = $(PYTESTS) log_console.py
EXTRA_DIST = console.out check_output.sh
PYTESTS_GEN = log_console.py
PYTESTS_NOGEN = log_test.py
noinst_SCRIPTS = $(PYTESTS_GEN)
EXTRA_DIST = console.out check_output.sh $(PYTESTS_NOGEN)
# If necessary (rare cases), explicitly specify paths to dynamic libraries
# required by loadable python modules.
......@@ -11,6 +12,7 @@ LIBRARY_PATH_PLACEHOLDER += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/cc/.
endif
# test using command-line arguments, so use check-local target instead of TESTS
# We need to run the cycle twice, because once the files are in builddir, once in srcdir
check-local:
$(LIBRARY_PATH_PLACEHOLDER) \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/python/isc/log \
......@@ -20,10 +22,17 @@ if ENABLE_PYTHON_COVERAGE
rm -f .coverage
${LN_S} $(abs_top_srcdir)/.coverage .coverage
endif
for pytest in $(PYTESTS) ; do \
for pytest in $(PYTESTS_NOGEN) ; do \
echo Running test: $$pytest ; \
$(LIBRARY_PATH_PLACEHOLDER) \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/python/isc/log:$(abs_top_builddir)/src/lib/log/python/.libs \
B10_TEST_PLUGIN_DIR=$(abs_top_srcdir)/src/bin/cfgmgr/plugins \
$(PYCOVERAGE_RUN) $(abs_srcdir)/$$pytest || exit ; \
done ; \
for pytest in $(PYTESTS_GEN) ; do \
echo Running test: $$pytest ; \
$(LIBRARY_PATH_PLACEHOLDER) \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/python/isc/log:$(abs_top_builddir)/src/lib/log/python/.libs \
B10_TEST_PLUGIN_DIR=$(abs_top_srcdir)/src/bin/cfgmgr/plugins \
$(PYCOVERAGE_RUN) $(abs_builddir)/$$pytest || exit ; \
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