tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

openh264.py (839B)


      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 This transform is used to help populate mozharness options for openh264 jobs
      6 """
      7 
      8 from taskgraph.transforms.base import TransformSequence
      9 
     10 transforms = TransformSequence()
     11 
     12 
     13 @transforms.add
     14 def set_mh_options(config, jobs):
     15    """
     16    This transform sets the 'openh264_rev' attribute.
     17    """
     18    for job in jobs:
     19        repo = job.pop("repo")
     20        rev = job.pop("revision")
     21        attributes = job.setdefault("attributes", {})
     22        attributes["openh264_rev"] = rev
     23        run = job.setdefault("run", {})
     24        options = run.setdefault("options", [])
     25        options.extend([f"repo={repo}", f"rev={rev}"])
     26        yield job