Skip to content

Commit 2afc838

Browse files
committed
feat: add multithreading tests
1 parent c01f67c commit 2afc838

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

taskcluster/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ treeherder:
77
'check': 'Checks and lints'
88
'doc': 'Documentation tasks'
99
'unit': 'Unit test tasks'
10+
'unit-multithread': 'Unit test tasks with multithreading enabled'
1011
'integration': 'Integration test tasks'
1112

1213
index:

taskcluster/kinds/test/linux.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@ unit:
5050
command: >-
5151
uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv
5252
53+
unit-multithread:
54+
description: "Run unit tests with py{matrix[python]} on Linux"
55+
matrix:
56+
set-name: "unit-multithread-py{matrix[python]}"
57+
substitution-fields: [description, run.command, treeherder, worker, attributes]
58+
python: ["314t"]
59+
worker:
60+
docker-image: {in-tree: python}
61+
env:
62+
TASKGRAPH_USE_THREADS: "1"
63+
artifacts:
64+
- type: file
65+
path: "/builds/worker/artifacts/coverage"
66+
name: "public/coverage.py{matrix[python]}"
67+
treeherder:
68+
symbol: unit-multithread(py{matrix[python]})
69+
run:
70+
command: >-
71+
uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv
72+
5373
integration:
5474
description: "Run unit tests with py{matrix[python]} on Linux with resolution {matrix[resolution]}"
5575
attributes:

taskcluster/kinds/test/windows.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,20 @@ unit-win:
3030
python3 -V &&
3131
powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' &&
3232
~/.local/bin/uv.exe run -m pytest -vv
33+
34+
unit-multithread-win:
35+
description: "Run unit tests with python on Windows"
36+
attributes:
37+
platform: windows
38+
worker-type: t-windows
39+
worker:
40+
env:
41+
TASKGRAPH_USE_THREADS: "1"
42+
treeherder:
43+
platform: test-win/opt
44+
symbol: unit-multithread(py)
45+
run:
46+
command: >-
47+
python3 -V &&
48+
powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' &&
49+
~/.local/bin/uv.exe run -p 3.14t -m pytest -vv

0 commit comments

Comments
 (0)