Skip to content

Commit

Permalink
Support getting suite and chunk for fuzzing ccov tasks (#2395)
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-c authored Jul 25, 2024
1 parent f02f7f3 commit 5580b68
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bot/code_coverage_bot/taskcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def get_suite(task):
return "build-signing"
elif tags.get("kind") == "source-test":
return "source-test"
elif tags.get("kind") == "fuzzing":
return "fuzzing"
elif "suite" in extra:
if isinstance(extra["suite"], dict):
return extra["suite"]["name"]
Expand Down
109 changes: 109 additions & 0 deletions bot/tests/fixtures/fuzzing-grizzly-windows64-ccov.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"provisionerId": "gecko-t",
"workerType": "win11-64-2009-source",
"taskQueueId": "gecko-t/win11-64-2009-source",
"schedulerId": "gecko-level-3",
"projectId": "none",
"taskGroupId": "VJjEns0FQU26bhsggfboIQ",
"dependencies": [
"DH-mnrnVRK2GBdWNSC73Lg",
"eiC54KPpTQ6bGQGR82lZZw"
],
"requires": "all-completed",
"routes": [
"tc-treeherder.v2.mozilla-central.7aa82d7563335ed4da92818c597c9ddea8aac4f4"
],
"priority": "medium",
"retries": 5,
"created": "2024-07-17T15:34:47.027Z",
"deadline": "2024-07-18T15:34:47.027Z",
"expires": "2024-10-15T15:34:47.027Z",
"scopes": [
"secrets:get:project/taskcluster/gecko/hgfingerprint",
"secrets:get:project/taskcluster/gecko/hgmointernal",
"generic-worker:cache:gecko-level-3-checkouts"
],
"payload": {
"env": {
"GECKO_PATH": "./build/src",
"MOZ_FETCHES": "[{\"artifact\": \"public/build/python.tar.zst\", \"extract\": true, \"task\": \"eiC54KPpTQ6bGQGR82lZZw\"}, {\"artifact\": \"public/build/target.zip\", \"extract\": true, \"task\": \"DH-mnrnVRK2GBdWNSC73Lg\"}]",
"HG_STORE_PATH": "y:/hg-shared",
"MOZ_SCM_LEVEL": "3",
"GECKO_HEAD_REV": "7aa82d7563335ed4da92818c597c9ddea8aac4f4",
"MOZ_AUTOMATION": "1",
"MOZ_FETCHES_DIR": "fetches",
"MOZ_PYTHON_HOME": "fetches/python",
"SCCACHE_DISABLE": "1",
"GECKO_BINARY_PATH": "$MOZ_FETCHES_DIR/firefox/firefox.exe",
"GECKO_BASE_REPOSITORY": "https://hg.mozilla.org/mozilla-unified",
"GECKO_HEAD_REPOSITORY": "https://hg.mozilla.org/mozilla-central"
},
"mounts": [
{
"cacheName": "gecko-level-3-checkouts",
"directory": "./build"
},
{
"file": "./run-task",
"content": {
"url": "http://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VJjEns0FQU26bhsggfboIQ/artifacts/public/run-task"
}
},
{
"file": "./fetch-content",
"content": {
"url": "http://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VJjEns0FQU26bhsggfboIQ/artifacts/public/fetch-content"
}
},
{
"file": "./robustcheckout.py",
"content": {
"url": "http://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VJjEns0FQU26bhsggfboIQ/artifacts/public/robustcheckout.py"
}
}
],
"command": [
"C:/mozilla-build/python3/python3.exe run-task --gecko-checkout=./build/src --task-cwd build/src -- bash -cx \"python3 ./mach python-test --subsuite fuzzing --run-slow\""
],
"maxRunTime": 1800,
"onExitStatus": {
"retry": [
1073807364,
3221225786,
137
]
}
},
"metadata": {
"name": "fuzzing-grizzly-windows64-ccov",
"owner": "[email protected]",
"source": "https://hg.mozilla.org/mozilla-central/file/7aa82d7563335ed4da92818c597c9ddea8aac4f4/taskcluster/kinds/fuzzing",
"description": "Python Fuzzing Smoke Tests ([Treeherder job](https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=7aa82d7563335ed4da92818c597c9ddea8aac4f4&selectedTaskRun=EySSqDwdTIOG2trg4W8sCQ))"
},
"tags": {
"os": "windows",
"kind": "fuzzing",
"label": "fuzzing-grizzly-windows64-ccov",
"retrigger": "false",
"createdForUser": "[email protected]",
"worker-implementation": "generic-worker"
},
"extra": {
"index": {
"rank": 0
},
"parent": "VJjEns0FQU26bhsggfboIQ",
"treeherder": {
"tier": 3,
"symbol": "fuzzing-python",
"jobKind": "test",
"machine": {
"platform": "windows2012-64"
},
"collection": {
"ccov": true
}
},
"treeherder-platform": "windows2012-64/ccov"
}
}
3 changes: 3 additions & 0 deletions bot/tests/test_taskcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def test_chunk_to_suite(chunk, expected):
("build-win64-ccov/debug", "build"),
("build-signing-win64-ccov/debug", "build-signing"),
("source-test-node-newtab-unit-tests-ccov", "source-test"),
("fuzzing-grizzly-windows64-ccov", "fuzzing"),
],
)
def test_get_chunk(task_name, expected):
Expand Down Expand Up @@ -244,6 +245,7 @@ def test_get_chunk(task_name, expected):
("build-win64-ccov/debug", "build"),
("build-signing-win64-ccov/debug", "build-signing"),
("source-test-node-newtab-unit-tests-ccov", "source-test"),
("fuzzing-grizzly-windows64-ccov", "fuzzing"),
],
)
def test_get_suite(task_name, expected):
Expand All @@ -270,6 +272,7 @@ def test_get_suite(task_name, expected):
("build-win64-ccov/debug", "windows"),
("build-signing-win64-ccov/debug", "windows"),
("source-test-node-newtab-unit-tests-ccov", "linux"),
("fuzzing-grizzly-windows64-ccov", "windows"),
],
)
def test_get_platform(task_name, expected):
Expand Down

0 comments on commit 5580b68

Please sign in to comment.