startup_tests_deps.py (921B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5 from taskgraph.transforms.base import TransformSequence 6 7 transforms = TransformSequence() 8 9 10 @transforms.add 11 def add_android_startup_test_dependencies(config, jobs): 12 scheduled_tasks = [ 13 t 14 for t in config.kind_dependencies_tasks.values() 15 if t.kind == "android-startup-test" 16 ] 17 for job in jobs: 18 job_build_type = job["attributes"].get("build-type", "") 19 matching_tasks = [ 20 t 21 for t in scheduled_tasks 22 if job_build_type in t.attributes.get("build-type", "") 23 ] 24 if matching_tasks: 25 job.setdefault("dependencies", {}).update({ 26 t.label: t.label for t in matching_tasks 27 }) 28 yield job