mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
a3a9e7939f
We have a `unittest_try_name` for all unit test tasks, and similarly a `talos_try_name`. The `-j` flag controls tasks known as "jobs" (although the word has dozens of other meanings, too). Some of those set `job_try_name`, but others do not and have special-case support in `try_option_syntax.py`. With this change, all "jobs" set `job_try_name` and the special-case is removed. MozReview-Commit-ID: 9hvW7wBIl2B --HG-- extra : rebase_source : 120b5e9e7aa8f81fe49e72f4dadafdbd145ac357
20 lines
669 B
Python
20 lines
669 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 __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
from taskgraph.transforms.base import TransformSequence
|
|
|
|
transforms = TransformSequence()
|
|
|
|
|
|
@transforms.add
|
|
def set_job_try_name(config, jobs):
|
|
"""
|
|
For a task which is governed by `-j` in try syntax, set the `job_try_name`
|
|
attribute based on the job name.
|
|
"""
|
|
for job in jobs:
|
|
job.setdefault('attributes', {}).setdefault('job_try_name', job['name'])
|
|
yield job
|