From 6cefc64483d7e0db3560eb32a3118ec40a086ecb Mon Sep 17 00:00:00 2001 From: Ashish Kumar Date: Wed, 28 Sep 2022 14:21:34 +0400 Subject: [PATCH 1/3] Add instruction for running unit tests in parallel --- docs/development/contributing_guide.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/development/contributing_guide.md b/docs/development/contributing_guide.md index cb0d727efa63..5c3722516843 100644 --- a/docs/development/contributing_guide.md +++ b/docs/development/contributing_guide.md @@ -167,6 +167,12 @@ was broken. They are slower than the linters but will typically catch more error poetry run trial tests ``` +You can run unit tests in parallel by specifying `-jX` argument to `trial` where `X` is the number of parallel runners you want. To use 4 cpu cores, you would run them like: + +```sh +poetry run trial -j4 tests +``` + If you wish to only run *some* unit tests, you may specify another module instead of `tests` - or a test class or a method: From 7ca4d037122aa9174d4bbd65d3dc5c041032b70c Mon Sep 17 00:00:00 2001 From: Ashfame Date: Wed, 28 Sep 2022 14:28:37 +0400 Subject: [PATCH 2/3] add changelog file --- changelog.d/13928.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/13928.doc diff --git a/changelog.d/13928.doc b/changelog.d/13928.doc new file mode 100644 index 000000000000..918755b7d299 --- /dev/null +++ b/changelog.d/13928.doc @@ -0,0 +1 @@ +Added instruction to contributing guide for running unit tests in parallel. Contributed by @ashfame. From 3b494188c6826b6b07c97b3e9e4fdd706ab28b0f Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Wed, 28 Sep 2022 12:43:17 +0200 Subject: [PATCH 3/3] Fixup changelog --- changelog.d/13928.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/13928.doc b/changelog.d/13928.doc index 918755b7d299..04cd06f19da2 100644 --- a/changelog.d/13928.doc +++ b/changelog.d/13928.doc @@ -1 +1 @@ -Added instruction to contributing guide for running unit tests in parallel. Contributed by @ashfame. +Add instruction to contributing guide for running unit tests in parallel. Contributed by @ashfame.