Skip to content

Commit a8f7183

Browse files
authored
bot: Support parsing suite and chunk name from source-test tasks (#1298)
Fixes #1297
1 parent e8e9752 commit a8f7183

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

bot/code_coverage_bot/taskcluster.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def get_suite(task):
124124
return "build"
125125
elif tags.get("kind") == "build-signing":
126126
return "build-signing"
127+
elif tags.get("kind") == "source-test":
128+
return "source-test"
127129
elif "suite" in extra:
128130
if isinstance(extra["suite"], dict):
129131
return extra["suite"]["name"]
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"provisionerId": "gecko-t",
3+
"workerType": "t-linux-xlarge-source",
4+
"taskQueueId": "gecko-t/t-linux-xlarge-source",
5+
"schedulerId": "gecko-level-1",
6+
"projectId": "none",
7+
"taskGroupId": "QrXM_S09ScGeYd7VH4-qUg",
8+
"dependencies": [
9+
"Ojg_ahyfQs-GQooZk4pKOA",
10+
"XFg6cRShStOTA2Xl4p8-aA"
11+
],
12+
"requires": "all-completed",
13+
"routes": [
14+
"tc-treeherder.v2.try.cfeddbeafb47a71ca48f913147e71610c9e58c70"
15+
],
16+
"priority": "very-low",
17+
"retries": 5,
18+
"created": "2022-01-11T01:12:21.332Z",
19+
"deadline": "2022-01-12T01:12:21.332Z",
20+
"expires": "2022-02-08T01:12:21.332Z",
21+
"scopes": [
22+
"secrets:get:project/taskcluster/gecko/hgfingerprint",
23+
"secrets:get:project/taskcluster/gecko/hgmointernal",
24+
"docker-worker:feature:allowPtrace",
25+
"docker-worker:cache:gecko-level-1-checkouts-hg58-v3-35e6d2147228a7dd8319"
26+
],
27+
"payload": {
28+
"env": {
29+
"GECKO_PATH": "/builds/worker/checkouts/gecko",
30+
"TRY_SELECTOR": "fuzzy",
31+
"HG_STORE_PATH": "/builds/worker/checkouts/hg-store",
32+
"MOZ_SCM_LEVEL": "1",
33+
"GECKO_HEAD_REV": "cfeddbeafb47a71ca48f913147e71610c9e58c70",
34+
"MOZ_AUTOMATION": "1",
35+
"SCCACHE_DISABLE": "1",
36+
"TASKCLUSTER_CACHES": "/builds/worker/checkouts",
37+
"TASKCLUSTER_VOLUMES": "/builds/worker/.cache;/builds/worker/checkouts;/builds/worker/tooltool-cache;/builds/worker/workspace",
38+
"GECKO_BASE_REPOSITORY": "https://hg.mozilla.org/mozilla-unified",
39+
"GECKO_HEAD_REPOSITORY": "https://hg.mozilla.org/try",
40+
"TASKCLUSTER_UNTRUSTED_CACHES": "1"
41+
},
42+
"cache": {
43+
"gecko-level-1-checkouts-hg58-v3-35e6d2147228a7dd8319": "/builds/worker/checkouts"
44+
},
45+
"image": {
46+
"path": "public/image.tar.zst",
47+
"type": "task-image",
48+
"taskId": "XFg6cRShStOTA2Xl4p8-aA"
49+
},
50+
"command": [
51+
"/builds/worker/bin/run-task",
52+
"--gecko-checkout=/builds/worker/checkouts/gecko",
53+
"--fetch-hgfingerprint",
54+
"--task-cwd",
55+
"/builds/worker/checkouts/gecko",
56+
"--",
57+
"bash",
58+
"-cx",
59+
"cd /builds/worker/checkouts/gecko/browser/components/newtab && npm install && node bin/try-runner.js\n"
60+
],
61+
"features": {
62+
"allowPtrace": true,
63+
"taskclusterProxy": true
64+
},
65+
"artifacts": {
66+
"public/code-coverage-grcov.zip": {
67+
"path": "/builds/worker/checkouts/gecko/browser/components/newtab/code-coverage-grcov.zip",
68+
"type": "file",
69+
"expires": "2022-02-08T01:12:21.332Z"
70+
}
71+
},
72+
"maxRunTime": 1800,
73+
"onExitStatus": {
74+
"retry": [
75+
72
76+
],
77+
"purgeCaches": [
78+
72
79+
]
80+
}
81+
},
82+
"metadata": {
83+
"name": "source-test-node-newtab-unit-tests-ccov",
84+
"owner": "[email protected]",
85+
"source": "https://hg.mozilla.org/try/file/cfeddbeafb47a71ca48f913147e71610c9e58c70/taskcluster/ci/source-test",
86+
"description": "newtab unit tests code coverage ([Treeherder job](https://treeherder.mozilla.org/#/jobs?repo=try&revision=cfeddbeafb47a71ca48f913147e71610c9e58c70&selectedTaskRun=JWSwQvELR6C6U2mz66BCfA))"
87+
},
88+
"tags": {
89+
"os": "linux",
90+
"kind": "source-test",
91+
"label": "source-test-node-newtab-unit-tests-ccov",
92+
"retrigger": "true",
93+
"createdForUser": "[email protected]",
94+
"worker-implementation": "docker-worker"
95+
},
96+
"extra": {
97+
"index": {
98+
"rank": 1641863325
99+
},
100+
"parent": "QrXM_S09ScGeYd7VH4-qUg",
101+
"treeherder": {
102+
"tier": 1,
103+
"symbol": "newtab-ccov",
104+
"jobKind": "test",
105+
"machine": {
106+
"platform": "linux1804-64"
107+
},
108+
"groupName": "Node tests",
109+
"collection": {
110+
"opt": true
111+
},
112+
"groupSymbol": "node"
113+
},
114+
"treeherder-platform": "linux1804-64/opt"
115+
}
116+
}

bot/tests/test_taskcluster.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ def test_chunk_to_suite(chunk, expected):
214214
("build-android-test-ccov/opt", "build"),
215215
("build-win64-ccov/debug", "build"),
216216
("build-signing-win64-ccov/debug", "build-signing"),
217+
("source-test-node-newtab-unit-tests-ccov", "source-test"),
217218
],
218219
)
219220
def test_get_chunk(task_name, expected):
@@ -242,6 +243,7 @@ def test_get_chunk(task_name, expected):
242243
("build-android-test-ccov/opt", "build"),
243244
("build-win64-ccov/debug", "build"),
244245
("build-signing-win64-ccov/debug", "build-signing"),
246+
("source-test-node-newtab-unit-tests-ccov", "source-test"),
245247
],
246248
)
247249
def test_get_suite(task_name, expected):
@@ -267,6 +269,7 @@ def test_get_suite(task_name, expected):
267269
("build-android-test-ccov/opt", "android"),
268270
("build-win64-ccov/debug", "windows"),
269271
("build-signing-win64-ccov/debug", "windows"),
272+
("source-test-node-newtab-unit-tests-ccov", "linux"),
270273
],
271274
)
272275
def test_get_platform(task_name, expected):

0 commit comments

Comments
 (0)