🐛(makefile) fix passing args to tests in makefile

When using Makefile to launch tests, passing flags as well as specific
classes (using "::") was broken. This PR fixes this issue, by adding
an `ARGS` argument allowing to do
`make test ARGS="core/tests/foo.py::Test::x -vv"`.
This commit is contained in:
leo
2026-07-06 11:44:42 +02:00
committed by aleb_the_flash
parent df1495c97b
commit 74b791e207
2 changed files with 17 additions and 13 deletions
+4 -1
View File
@@ -8,7 +8,10 @@ and this project adheres to
## [Unreleased] ## [Unreleased]
- 🚀 (front) fix frontend build failure ### Fixed
- 🚀(front) fix frontend build failure
- 🐛(makefile) fix args in make test
## [1.22.0] - 2026-07-03 ## [1.22.0] - 2026-07-03
+13 -12
View File
@@ -211,24 +211,25 @@ lint-pylint: ## lint back-end python sources with pylint only on changed files f
@$(COMPOSE_RUN_APP) pylint meet demo core @$(COMPOSE_RUN_APP) pylint meet demo core
.PHONY: lint-pylint .PHONY: lint-pylint
test: ## run project tests test: ## run project tests; pass extra pytest args via ARGS, e.g. `make test ARGS="-vv"`
@$(MAKE) test-back-parallel @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \
@$(MAKE) test-summary $(MAKE) test-back-parallel ARGS="$${args}" && \
$(MAKE) test-summary ARGS="$${args}"
.PHONY: test .PHONY: test
test-back: ## run back-end tests test-back: ## run back-end tests (pass extra pytest args via ARGS)
@args="$(filter-out $@,$(MAKECMDGOALS))" && \ @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \
bin/pytest $${args:-${1}} bin/pytest $${args}
.PHONY: test-back .PHONY: test-back
test-back-parallel: ## run all back-end tests in parallel test-back-parallel: ## run all back-end tests in parallel (pass extra pytest args via ARGS)
@args="$(filter-out $@,$(MAKECMDGOALS))" && \ @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \
bin/pytest -n auto $${args:-${1}} bin/pytest -n auto $${args}
.PHONY: test-back-parallel .PHONY: test-back-parallel
test-summary: ## run summary tests test-summary: ## run summary tests (pass extra pytest args via ARGS)
@args="$(filter-out $@,$(MAKECMDGOALS))" && \ @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \
bin/pytest-summary $${args:-${1}} bin/pytest-summary $${args}
.PHONY: test-summary .PHONY: test-summary
makemigrations: ## run django makemigrations for the Meet project. makemigrations: ## run django makemigrations for the Meet project.