From 060fdf36340c7b86c001c8581f42f6f8b1684e55 Mon Sep 17 00:00:00 2001 From: smark-1 <75799735+smark-1@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:24:26 -0500 Subject: [PATCH 1/3] run tests in parallel --- Makefile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9180948..de0e132 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ migrate: ## Migrate the wagtail bakery site migrations docker compose exec web python manage.py migrate test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name` - docker compose exec -w /code/wagtail web python runtests.py $(file) $(FILE) + docker compose exec -w /code/wagtail web python runtests.py $(file) $(FILE) --parallel format-wagtail: ## Format Wagtail repo docker compose exec -w /code/wagtail web make format-server diff --git a/README.md b/README.md index 0dbbbc3..4bbc108 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ make test or ```sh -docker compose exec -w /code/wagtail web python runtests.py +docker compose exec -w /code/wagtail web python runtests.py --parallel ``` ### Run tests for a specific file From f3b0986c0f1b1d9798a65315b4cd8f68004a9c0f Mon Sep 17 00:00:00 2001 From: smark-1 <75799735+smark-1@users.noreply.github.com> Date: Sun, 24 Nov 2024 18:53:01 -0500 Subject: [PATCH 2/3] Add separate command for test parallel --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index de0e132..11e7502 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,11 @@ migrate: ## Migrate the wagtail bakery site migrations docker compose exec web python manage.py migrate test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name` - docker compose exec -w /code/wagtail web python runtests.py $(file) $(FILE) --parallel + docker compose exec -w /code/wagtail web python runtests.py $(file) $(FILE) +test-parallel: ## Same as make test but will run tests in parallel + docker compose exec -w /code/wagtail web python runtests.py $(file) $(FILE) --parallel + format-wagtail: ## Format Wagtail repo docker compose exec -w /code/wagtail web make format-server docker compose exec frontend make format-client From d66b709bb4703b543131e9b4585f8baaa77a0fb2 Mon Sep 17 00:00:00 2001 From: smark-1 <75799735+smark-1@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:14:45 -0500 Subject: [PATCH 3/3] add docs --- Makefile | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 11e7502..99e6911 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ migrate: ## Migrate the wagtail bakery site migrations test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name` docker compose exec -w /code/wagtail web python runtests.py $(file) $(FILE) -test-parallel: ## Same as make test but will run tests in parallel +test-parallel: ## Equivalent to make test, but runs tests in parallel docker compose exec -w /code/wagtail web python runtests.py $(file) $(FILE) --parallel format-wagtail: ## Format Wagtail repo diff --git a/README.md b/README.md index 4bbc108..0598055 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ docker compose down ### Run tests ```sh +# run make test-parallel for tests to run faster but error messages can be more cryptic make test ```