From daae1656e0c4c3bca0ca9b3092d2ba9dc8811948 Mon Sep 17 00:00:00 2001 From: asavchkov Date: Tue, 22 Aug 2023 15:34:06 +0700 Subject: [PATCH] Run Python tests in parallel only if pytest-xdist is available --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 33b06b0..9f3d62f 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ test-python: elif [ "$(TEST_MODE)" = paranoia ]; then \ env="$$env PG_PROBACKUP_PARANOIA=ON"; \ fi; \ - env $$env python3 -m pytest -svv -n $(PYTEST_PROCESSES)$(if $(TESTS), -k '$(TESTS)') tests/ptrack_test.py + env $$env python3 -m pytest -svv$(if $(shell python3 -m pytest --help | grep '\-n '), -n $(PYTEST_PROCESSES))$(if $(TESTS), -k '$(TESTS)') tests/ptrack_test.py coverage: gcov *.c *.h