pytest: Support targeting specific tests using make pytest.

Select tests by setting the `PYTEST_TESTS` environment variable.

Changelog-None
This commit is contained in:
Se7enZ
2024-09-19 13:16:38 +02:00
committed by ShahanaFarooqui
parent cbe94bcb42
commit 537d613035

View File

@@ -456,6 +456,11 @@ else
PYTEST_OPTS += -x
endif
# Allow for targeting specific tests by setting the PYTEST_TESTS environment variable.
ifeq ($(PYTEST_TESTS),)
PYTEST_TESTS = "tests/"
endif
check-units:
check: check-units installcheck pytest
@@ -466,7 +471,7 @@ ifeq ($(PYTEST),)
exit 1
else
# Explicitly hand VALGRIND so you can override on make cmd line.
PYTHONPATH=$(MY_CHECK_PYTHONPATH) TEST_DEBUG=1 VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS)
PYTHONPATH=$(MY_CHECK_PYTHONPATH) TEST_DEBUG=1 VALGRIND=$(VALGRIND) $(PYTEST) $(PYTEST_TESTS) $(PYTEST_OPTS)
endif
check-fuzz: $(ALL_FUZZ_TARGETS)