diff --git a/Makefile b/Makefile index 4cdf97c9aca0..f835842c99ee 100644 --- a/Makefile +++ b/Makefile @@ -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)