mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Enable splitting our large tests into groups
This commit is contained in:
parent
5014f69b79
commit
919f821885
1 changed files with 13 additions and 2 deletions
15
Makefile
15
Makefile
|
@ -8,6 +8,9 @@ MYPY_ARGS := --ignore-missing-imports \
|
|||
--warn-unreachable \
|
||||
--warn-unused-ignores \
|
||||
--exclude $(LARGE_TEST_REPO_DIR)/*.py
|
||||
TEST_GROUP_COUNT ?= 1
|
||||
TEST_GROUP ?= 1
|
||||
TEST_GROUP_RANDOM_SEED ?= 999999999
|
||||
|
||||
.PHONY: lint
|
||||
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)
|
||||
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
|
||||
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)
|
||||
|
||||
Dockerfile: Dockerfile.env Dockerfile.in
|
||||
|
|
Loading…
Reference in a new issue