tor-browser

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

startup_test.py (1409B)


      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 
      6 from taskgraph.transforms.base import TransformSequence
      7 
      8 transforms = TransformSequence()
      9 
     10 
     11 @transforms.add
     12 def add_command(config, jobs):
     13    for job in jobs:
     14        extra_config = job.pop("extra-config")
     15        upstream_kind = extra_config["upstream_kind"]
     16        upstream_artifact = extra_config["upstream_artifact"]
     17        binary = extra_config["binary"]
     18        package_to_test = f"<{upstream_kind}/public/build/{upstream_artifact}>"
     19 
     20        if job["attributes"]["build_platform"].startswith("linux"):
     21            job["run"]["command"] = {
     22                "artifact-reference": ". $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && "
     23                + "python3 ./mach python testing/mozharness/scripts/does_it_crash.py "
     24                + "--run-for 30 --thing-url "
     25                + package_to_test
     26                + " --thing-to-run "
     27                + binary
     28            }
     29        else:
     30            job["run"]["mach"] = {
     31                "artifact-reference": "python testing/mozharness/scripts/does_it_crash.py "
     32                + "--run-for 30 --thing-url "
     33                + package_to_test
     34                + " --thing-to-run "
     35                + binary
     36            }
     37 
     38        yield job