mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 09:54:42 +00:00
ba5a0fdc37
Differential Revision: https://phabricator.services.mozilla.com/D211104
29 lines
921 B
Python
29 lines
921 B
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
from taskgraph.transforms.base import TransformSequence
|
|
|
|
transforms = TransformSequence()
|
|
|
|
|
|
@transforms.add
|
|
def add_android_startup_test_dependencies(config, jobs):
|
|
scheduled_tasks = [
|
|
t
|
|
for t in config.kind_dependencies_tasks.values()
|
|
if t.kind == "android-startup-test"
|
|
]
|
|
for job in jobs:
|
|
job_build_type = job["attributes"].get("build-type", "")
|
|
matching_tasks = [
|
|
t
|
|
for t in scheduled_tasks
|
|
if job_build_type in t.attributes.get("build-type", "")
|
|
]
|
|
if matching_tasks:
|
|
job.setdefault("dependencies", {}).update(
|
|
{t.label: t.label for t in matching_tasks}
|
|
)
|
|
yield job
|