File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11include openfisca_make/build.mk
22include openfisca_make/install.mk
33include openfisca_make/lint.mk
4- include openfisca_make/test.mk
54include openfisca_make/serve.mk
5+ include openfisca_make/test_code.mk
6+ include openfisca_make/test_doc.mk
67
78help = sed -n "/^$1/ { x ; p ; } ; s/\# \#/[⚙]/ ; s/\./.../ ; x" ${MAKEFILE_LIST}
89
910.DEFAULT_GOAL := all
1011
1112# # Same as `make test`.
1213all : test
14+
15+ # # Run all lints and tests.
16+ test : clean lint test-code
Original file line number Diff line number Diff line change 1+ python_packages = $(shell python -c "import sysconfig; print(sysconfig.get_paths() [\"purelib\"])")
2+
3+ # # Run openfisca-core & country/extension template tests.
4+ test-code : test-core test-country test-extension
5+ @# # Usage:
6+ @# #
7+ @# # make test [pytest_args="--ARG"] [openfisca_args="--ARG"]
8+ @# #
9+ @# # Examples:
10+ @# #
11+ @# # make test
12+ @# # make test pytest_args="--exitfirst"
13+ @# # make test openfisca_args="--performance"
14+ @# # make test pytest_args="--exitfirst" openfisca_args="--performance"
15+
16+ # # Run openfisca-core tests.
17+ test-core : $(shell git ls-files "tests/* .py")
18+ @$(call help,$@ :)
19+ @PYTEST_ADDOPTS=" ${PYTEST_ADDOPTS} --cov=openfisca_core ${pytest_args} " openfisca test $? ${openfisca_args}
20+
21+ # # Run country-template tests.
22+ test-country :
23+ @$(call help,$@ :)
24+ @PYTEST_ADDOPTS=" ${PYTEST_ADDOPTS} ${pytest_args} " openfisca test ${python_packages} /openfisca_country_template/tests --country-package openfisca_country_template ${openfisca_args}
25+
26+ # # Run extension-template tests.
27+ test-extension :
28+ @$(call help,$@ :)
29+ @PYTEST_ADDOPTS=" ${PYTEST_ADDOPTS} ${pytest_args} " openfisca test ${python_packages} /openfisca_extension_template/tests --country-package openfisca_country_template --extensions openfisca_extension_template ${openfisca_args}
Original file line number Diff line number Diff line change 11repo = https://github.com/openfisca/openfisca-doc
22branch = $(shell git branch --show-current)
3- python_packages = $(shell python -c "import sysconfig; print(sysconfig.get_paths() [\"purelib\"])")
4-
5- # # Run openfisca-core & country/extension template tests.
6- test : clean check-syntax-errors check-style check-types test-core test-country test-extension
7- @# # Usage:
8- @# #
9- @# # make test [pytest_args="--ARG"] [openfisca_args="--ARG"]
10- @# #
11- @# # Examples:
12- @# #
13- @# # make test
14- @# # make test pytest_args="--exitfirst"
15- @# # make test openfisca_args="--performance"
16- @# # make test pytest_args="--exitfirst" openfisca_args="--performance"
17-
18- # # Run openfisca-core tests.
19- test-core : $(shell git ls-files "tests/* .py")
20- @$(call help,$@ :)
21- @PYTEST_ADDOPTS=" ${PYTEST_ADDOPTS} --cov=openfisca_core ${pytest_args} " openfisca test $? ${openfisca_args}
22-
23- # # Run country-template tests.
24- test-country : ${python_packages}/openfisca_country_template/tests
25- @$(call help,$@ :)
26- @PYTEST_ADDOPTS=" ${PYTEST_ADDOPTS} ${pytest_args} " openfisca test $? --country-package openfisca_country_template ${openfisca_args}
27-
28- # # Run extension-template tests.
29- test-extension : ${python_packages}/openfisca_extension_template/tests
30- @$(call help,$@ :)
31- @PYTEST_ADDOPTS=" ${PYTEST_ADDOPTS} ${pytest_args} " openfisca test $? --country-package openfisca_country_template --extensions openfisca_extension_template ${openfisca_args}
323
334# # Check that the current changes do not break the doc.
345test-doc :
You can’t perform that action at this time.
0 commit comments