Enable splitting our large tests into groups

This commit is contained in:
Alex Pyrgiotis 2025-03-12 18:03:31 +02:00
parent 5014f69b79
commit 919f821885
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -8,6 +8,9 @@ MYPY_ARGS := --ignore-missing-imports \
--warn-unreachable \ --warn-unreachable \
--warn-unused-ignores \ --warn-unused-ignores \
--exclude $(LARGE_TEST_REPO_DIR)/*.py --exclude $(LARGE_TEST_REPO_DIR)/*.py
TEST_GROUP_COUNT ?= 1
TEST_GROUP ?= 1
TEST_GROUP_RANDOM_SEED ?= 999999999
.PHONY: lint .PHONY: lint
lint: ## Check the code for linting, formatting, and typing issues with ruff and mypy lint: ## Check the code for linting, formatting, and typing issues with ruff and mypy
@ -41,10 +44,18 @@ test-large-init: test-large-requirements
git submodule update $(LARGE_TEST_REPO_DIR) git submodule update $(LARGE_TEST_REPO_DIR)
cd $(LARGE_TEST_REPO_DIR) && $(MAKE) clone-docs cd $(LARGE_TEST_REPO_DIR) && $(MAKE) clone-docs
TEST_LARGE_RESULTS:=$(LARGE_TEST_REPO_DIR)/results/junit/commit_$(GIT_DESC).junit.xml TEST_LARGE_RESULTS:=$(LARGE_TEST_REPO_DIR)/results/junit/commit_$(GIT_DESC)_$(TEST_GROUP).junit.xml
.PHONY: test-large .PHONY: test-large
test-large: test-large-init ## Run large test set test-large: test-large-init ## Run large test set
python -m pytest --tb=no tests/test_large_set.py::TestLargeSet -v $(JUNIT_FLAGS) --junitxml=$(TEST_LARGE_RESULTS) python -m pytest \
--tb=no \
--test-group-count=$(TEST_GROUP_COUNT) \
--test-group=$(TEST_GROUP) \
--test-group-random-seed=$(TEST_GROUP_RANDOM_SEED) \
--junitxml=$(TEST_LARGE_RESULTS) \
$(JUNIT_FLAGS) \
-v \
tests/test_large_set.py::TestLargeSet
python $(TEST_LARGE_RESULTS)/report.py $(TEST_LARGE_RESULTS) python $(TEST_LARGE_RESULTS)/report.py $(TEST_LARGE_RESULTS)
Dockerfile: Dockerfile.env Dockerfile.in Dockerfile: Dockerfile.env Dockerfile.in