From 74b791e207283d2076b0c19e769149390c043929 Mon Sep 17 00:00:00 2001 From: leo <260626284+cameledev@users.noreply.github.com> Date: Mon, 6 Jul 2026 11:44:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(makefile)=20fix=20passing=20args?= =?UTF-8?q?=20to=20tests=20in=20makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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"`. --- CHANGELOG.md | 5 ++++- Makefile | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5393823..f7e98467 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,10 @@ and this project adheres to ## [Unreleased] -- 🚀 (front) fix frontend build failure +### Fixed + +- 🚀(front) fix frontend build failure +- 🐛(makefile) fix args in make test ## [1.22.0] - 2026-07-03 diff --git a/Makefile b/Makefile index 220b6d62..ac86b94d 100644 --- a/Makefile +++ b/Makefile @@ -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 .PHONY: lint-pylint -test: ## run project tests - @$(MAKE) test-back-parallel - @$(MAKE) test-summary +test: ## run project tests; pass extra pytest args via ARGS, e.g. `make test ARGS="-vv"` + @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \ + $(MAKE) test-back-parallel ARGS="$${args}" && \ + $(MAKE) test-summary ARGS="$${args}" .PHONY: test -test-back: ## run back-end tests - @args="$(filter-out $@,$(MAKECMDGOALS))" && \ - bin/pytest $${args:-${1}} +test-back: ## run back-end tests (pass extra pytest args via ARGS) + @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \ + bin/pytest $${args} .PHONY: test-back -test-back-parallel: ## run all back-end tests in parallel - @args="$(filter-out $@,$(MAKECMDGOALS))" && \ - bin/pytest -n auto $${args:-${1}} +test-back-parallel: ## run all back-end tests in parallel (pass extra pytest args via ARGS) + @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \ + bin/pytest -n auto $${args} .PHONY: test-back-parallel -test-summary: ## run summary tests - @args="$(filter-out $@,$(MAKECMDGOALS))" && \ - bin/pytest-summary $${args:-${1}} +test-summary: ## run summary tests (pass extra pytest args via ARGS) + @args="$(ARGS) $(filter-out $@,$(MAKECMDGOALS))" && \ + bin/pytest-summary $${args} .PHONY: test-summary makemigrations: ## run django makemigrations for the Meet project.