Skip to content

Commit 919f821

Browse files
committed
Enable splitting our large tests into groups
1 parent 5014f69 commit 919f821

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Makefile

+13-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ MYPY_ARGS := --ignore-missing-imports \
88
--warn-unreachable \
99
--warn-unused-ignores \
1010
--exclude $(LARGE_TEST_REPO_DIR)/*.py
11+
TEST_GROUP_COUNT ?= 1
12+
TEST_GROUP ?= 1
13+
TEST_GROUP_RANDOM_SEED ?= 999999999
1114

1215
.PHONY: lint
1316
lint: ## Check the code for linting, formatting, and typing issues with ruff and mypy
@@ -41,10 +44,18 @@ test-large-init: test-large-requirements
4144
git submodule update $(LARGE_TEST_REPO_DIR)
4245
cd $(LARGE_TEST_REPO_DIR) && $(MAKE) clone-docs
4346

44-
TEST_LARGE_RESULTS:=$(LARGE_TEST_REPO_DIR)/results/junit/commit_$(GIT_DESC).junit.xml
47+
TEST_LARGE_RESULTS:=$(LARGE_TEST_REPO_DIR)/results/junit/commit_$(GIT_DESC)_$(TEST_GROUP).junit.xml
4548
.PHONY: test-large
4649
test-large: test-large-init ## Run large test set
47-
python -m pytest --tb=no tests/test_large_set.py::TestLargeSet -v $(JUNIT_FLAGS) --junitxml=$(TEST_LARGE_RESULTS)
50+
python -m pytest \
51+
--tb=no \
52+
--test-group-count=$(TEST_GROUP_COUNT) \
53+
--test-group=$(TEST_GROUP) \
54+
--test-group-random-seed=$(TEST_GROUP_RANDOM_SEED) \
55+
--junitxml=$(TEST_LARGE_RESULTS) \
56+
$(JUNIT_FLAGS) \
57+
-v \
58+
tests/test_large_set.py::TestLargeSet
4859
python $(TEST_LARGE_RESULTS)/report.py $(TEST_LARGE_RESULTS)
4960

5061
Dockerfile: Dockerfile.env Dockerfile.in

0 commit comments

Comments
 (0)