From 63039f79278367bbfbf7dd05a34eff2b3b88855c Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Tue, 25 Jan 2022 18:01:54 +0100 Subject: [PATCH 1/2] bot: Support parsing suite and chunk name from source-test tasks Fixes #1297 --- bot/code_coverage_bot/taskcluster.py | 2 ++ bot/tests/test_taskcluster.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/bot/code_coverage_bot/taskcluster.py b/bot/code_coverage_bot/taskcluster.py index 6a9c7bce8..6ba2099a1 100644 --- a/bot/code_coverage_bot/taskcluster.py +++ b/bot/code_coverage_bot/taskcluster.py @@ -124,6 +124,8 @@ def get_suite(task): return "build" elif tags.get("kind") == "build-signing": return "build-signing" + elif tags.get("kind") == "source-test": + return "source-test" elif "suite" in extra: if isinstance(extra["suite"], dict): return extra["suite"]["name"] diff --git a/bot/tests/test_taskcluster.py b/bot/tests/test_taskcluster.py index 2644a7302..f2680553a 100644 --- a/bot/tests/test_taskcluster.py +++ b/bot/tests/test_taskcluster.py @@ -214,6 +214,7 @@ def test_chunk_to_suite(chunk, expected): ("build-android-test-ccov/opt", "build"), ("build-win64-ccov/debug", "build"), ("build-signing-win64-ccov/debug", "build-signing"), + ("source-test-node-newtab-unit-tests-ccov", "source-test"), ], ) def test_get_chunk(task_name, expected): @@ -242,6 +243,7 @@ def test_get_chunk(task_name, expected): ("build-android-test-ccov/opt", "build"), ("build-win64-ccov/debug", "build"), ("build-signing-win64-ccov/debug", "build-signing"), + ("source-test-node-newtab-unit-tests-ccov", "source-test"), ], ) def test_get_suite(task_name, expected): @@ -267,6 +269,7 @@ def test_get_suite(task_name, expected): ("build-android-test-ccov/opt", "android"), ("build-win64-ccov/debug", "windows"), ("build-signing-win64-ccov/debug", "windows"), + ("source-test-node-newtab-unit-tests-ccov", "linux"), ], ) def test_get_platform(task_name, expected): From c1bb6a449733f475ba4daf72ca288b0339eb2de1 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Wed, 26 Jan 2022 12:32:10 +0100 Subject: [PATCH 2/2] Add fixture --- ...urce-test-node-newtab-unit-tests-ccov.json | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 bot/tests/fixtures/source-test-node-newtab-unit-tests-ccov.json diff --git a/bot/tests/fixtures/source-test-node-newtab-unit-tests-ccov.json b/bot/tests/fixtures/source-test-node-newtab-unit-tests-ccov.json new file mode 100644 index 000000000..5c30b1bed --- /dev/null +++ b/bot/tests/fixtures/source-test-node-newtab-unit-tests-ccov.json @@ -0,0 +1,116 @@ +{ + "provisionerId": "gecko-t", + "workerType": "t-linux-xlarge-source", + "taskQueueId": "gecko-t/t-linux-xlarge-source", + "schedulerId": "gecko-level-1", + "projectId": "none", + "taskGroupId": "QrXM_S09ScGeYd7VH4-qUg", + "dependencies": [ + "Ojg_ahyfQs-GQooZk4pKOA", + "XFg6cRShStOTA2Xl4p8-aA" + ], + "requires": "all-completed", + "routes": [ + "tc-treeherder.v2.try.cfeddbeafb47a71ca48f913147e71610c9e58c70" + ], + "priority": "very-low", + "retries": 5, + "created": "2022-01-11T01:12:21.332Z", + "deadline": "2022-01-12T01:12:21.332Z", + "expires": "2022-02-08T01:12:21.332Z", + "scopes": [ + "secrets:get:project/taskcluster/gecko/hgfingerprint", + "secrets:get:project/taskcluster/gecko/hgmointernal", + "docker-worker:feature:allowPtrace", + "docker-worker:cache:gecko-level-1-checkouts-hg58-v3-35e6d2147228a7dd8319" + ], + "payload": { + "env": { + "GECKO_PATH": "/builds/worker/checkouts/gecko", + "TRY_SELECTOR": "fuzzy", + "HG_STORE_PATH": "/builds/worker/checkouts/hg-store", + "MOZ_SCM_LEVEL": "1", + "GECKO_HEAD_REV": "cfeddbeafb47a71ca48f913147e71610c9e58c70", + "MOZ_AUTOMATION": "1", + "SCCACHE_DISABLE": "1", + "TASKCLUSTER_CACHES": "/builds/worker/checkouts", + "TASKCLUSTER_VOLUMES": "/builds/worker/.cache;/builds/worker/checkouts;/builds/worker/tooltool-cache;/builds/worker/workspace", + "GECKO_BASE_REPOSITORY": "https://hg.mozilla.org/mozilla-unified", + "GECKO_HEAD_REPOSITORY": "https://hg.mozilla.org/try", + "TASKCLUSTER_UNTRUSTED_CACHES": "1" + }, + "cache": { + "gecko-level-1-checkouts-hg58-v3-35e6d2147228a7dd8319": "/builds/worker/checkouts" + }, + "image": { + "path": "public/image.tar.zst", + "type": "task-image", + "taskId": "XFg6cRShStOTA2Xl4p8-aA" + }, + "command": [ + "/builds/worker/bin/run-task", + "--gecko-checkout=/builds/worker/checkouts/gecko", + "--fetch-hgfingerprint", + "--task-cwd", + "/builds/worker/checkouts/gecko", + "--", + "bash", + "-cx", + "cd /builds/worker/checkouts/gecko/browser/components/newtab && npm install && node bin/try-runner.js\n" + ], + "features": { + "allowPtrace": true, + "taskclusterProxy": true + }, + "artifacts": { + "public/code-coverage-grcov.zip": { + "path": "/builds/worker/checkouts/gecko/browser/components/newtab/code-coverage-grcov.zip", + "type": "file", + "expires": "2022-02-08T01:12:21.332Z" + } + }, + "maxRunTime": 1800, + "onExitStatus": { + "retry": [ + 72 + ], + "purgeCaches": [ + 72 + ] + } + }, + "metadata": { + "name": "source-test-node-newtab-unit-tests-ccov", + "owner": "dmosedale@mozilla.com", + "source": "https://hg.mozilla.org/try/file/cfeddbeafb47a71ca48f913147e71610c9e58c70/taskcluster/ci/source-test", + "description": "newtab unit tests code coverage ([Treeherder job](https://treeherder.mozilla.org/#/jobs?repo=try&revision=cfeddbeafb47a71ca48f913147e71610c9e58c70&selectedTaskRun=JWSwQvELR6C6U2mz66BCfA))" + }, + "tags": { + "os": "linux", + "kind": "source-test", + "label": "source-test-node-newtab-unit-tests-ccov", + "retrigger": "true", + "createdForUser": "dmosedale@mozilla.com", + "worker-implementation": "docker-worker" + }, + "extra": { + "index": { + "rank": 1641863325 + }, + "parent": "QrXM_S09ScGeYd7VH4-qUg", + "treeherder": { + "tier": 1, + "symbol": "newtab-ccov", + "jobKind": "test", + "machine": { + "platform": "linux1804-64" + }, + "groupName": "Node tests", + "collection": { + "opt": true + }, + "groupSymbol": "node" + }, + "treeherder-platform": "linux1804-64/opt" + } +} \ No newline at end of file