-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mauko Quiroga
committed
Sep 24, 2021
1 parent
146e8ab
commit 9234668
Showing
3 changed files
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
include openfisca_make/build.mk | ||
include openfisca_make/install.mk | ||
include openfisca_make/lint.mk | ||
include openfisca_make/test.mk | ||
include openfisca_make/serve.mk | ||
include openfisca_make/test_code.mk | ||
include openfisca_make/test_doc.mk | ||
|
||
help = sed -n "/^$1/ { x ; p ; } ; s/\#\#/[⚙]/ ; s/\./.../ ; x" ${MAKEFILE_LIST} | ||
|
||
.DEFAULT_GOAL := all | ||
|
||
## Same as `make test`. | ||
all: test | ||
|
||
## Run all lints and tests. | ||
test: clean lint test-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
python_packages = $(shell python -c "import sysconfig; print(sysconfig.get_paths()[\"purelib\"])") | ||
|
||
## Run openfisca-core & country/extension template tests. | ||
test-code: test-core test-country test-extension | ||
@## Usage: | ||
@## | ||
@## make test [pytest_args="--ARG"] [openfisca_args="--ARG"] | ||
@## | ||
@## Examples: | ||
@## | ||
@## make test | ||
@## make test pytest_args="--exitfirst" | ||
@## make test openfisca_args="--performance" | ||
@## make test pytest_args="--exitfirst" openfisca_args="--performance" | ||
|
||
## Run openfisca-core tests. | ||
test-core: $(shell git ls-files "tests/*.py") | ||
@$(call help,$@:) | ||
@PYTEST_ADDOPTS="${PYTEST_ADDOPTS} --cov=openfisca_core ${pytest_args}" openfisca test $? ${openfisca_args} | ||
|
||
## Run country-template tests. | ||
test-country: | ||
@$(call help,$@:) | ||
@PYTEST_ADDOPTS="${PYTEST_ADDOPTS} ${pytest_args}" openfisca test ${python_packages}/openfisca_country_template/tests --country-package openfisca_country_template ${openfisca_args} | ||
|
||
## Run extension-template tests. | ||
test-extension: | ||
@$(call help,$@:) | ||
@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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters