Makefile.am 762 Bytes
Newer Older
1
PYCOVERAGE=@PYCOVERAGE@
Jeremy C. Reed's avatar
Jeremy C. Reed committed
2 3 4 5 6 7 8
PYTESTS = ccsession_test.py cfgmgr_test.py config_data_test.py
PYTESTS += module_spec_test.py
EXTRA_DIST = $(PYTESTS)
EXTRA_DIST += unittest_fakesession.py

# test using command-line arguments, so use check-local target instead of TESTS
check-local:
9 10 11 12 13
if ENABLE_PYTHON_COVERAGE
	touch $(abs_top_srcdir)/.coverage
	rm -f .coverage
	${LN_S} $(abs_top_srcdir)/.coverage .coverage
endif
Jeremy C. Reed's avatar
Jeremy C. Reed committed
14 15
	for pytest in $(PYTESTS) ; do \
	echo Running test: $$pytest ; \
16
	env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \
17 18
	CONFIG_TESTDATA_PATH=$(abs_top_srcdir)/src/lib/config/tests/testdata \
	CONFIG_WR_TESTDATA_PATH=$(abs_top_builddir)/src/lib/config/tests/testdata \
19
	$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
Jeremy C. Reed's avatar
Jeremy C. Reed committed
20
	done