# 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/.
---
loader: gecko_taskgraph.loader.test:loader

kind-dependencies:
    - build
    - repackage-signing-shippable-l10n-msix
    - repackage-signing-msix
    - fetch
    - toolchain
    - build-extensions

transforms:
    - gecko_taskgraph.transforms.test:transforms
    - gecko_taskgraph.transforms.job:transforms
    - gecko_taskgraph.transforms.task:transforms

# Adding a new test type or running tests on a new platform? Be sure to review
# https://wiki.mozilla.org/Sheriffing/Job_Visibility_Policy

task-defaults:
    run-on-repo-type: [hg]
    attributes:
        retrigger: true
    use-python: default
    use-uv: true
    require-signed-extensions:
        by-release-type:
            release|esr.*: true
            beta:
                by-test-platform:
                    .*-devedition/.*: false
                    default: true
            default: false
    docker-image:
        in-tree: ubuntu2404-test
    fetches:
        toolchain:
            by-test-platform:
                win.*:
                    - win32-minidump-stackwalk
                    - win32-fix-stacks
                macosx.*-64.*:
                    - macosx64-minidump-stackwalk
                    - macosx64-fix-stacks
                macosx.*-aarch64.*:
                    - macosx64-aarch64-minidump-stackwalk
                    - macosx64-aarch64-fix-stacks
                android-em-14.*:
                    - android34-system-image-x86_64-linux
                    - android34-avd-x86_64-linux
                    - android-emulator-linux
                    - linux64-minidump-stackwalk
                    - linux64-fix-stacks
                    - linux64-hostutils
                android-hw.*:
                    - linux64-minidump-stackwalk
                    - linux64-fix-stacks
                    - linux64-hostutils
                default:
                    - linux64-minidump-stackwalk
                    - linux64-fix-stacks
    suite:
        category: mochitest
    target:
        by-test-platform:
            android-em.*: geckoview-test_runner.apk
            android-hw.*: geckoview-test_runner.apk
            windows11-64.*:
                by-variant:
                    msix: target.installer.msix
                    default: null
            default: null
    tier:
        by-variant:
            xorigin:
                by-test-platform:
                    linux.*64/debug: 1
                    default: 2
            default:
                by-test-platform:
                    android-em.*/debug-isolated-process: 2
                    default: default
    mozharness:
        requires-signed-builds:
            by-test-platform:
                windows1.*:
                    by-variant:
                        msix: true
                        default: false
                default: false
        script:
            by-test-platform:
                android-em.*: android_emulator_unittest.py
                android-hw.*: android_hardware_unittest.py
                default: desktop_unittest.py
        config:
            by-test-platform:
                android-em-14.*:
                    - android/android_common.py
                    - android/android14-x86_64.py
                android-hw.*:
                    - android/android_common.py
                    - android/android_hw.py
                linux.*:
                    - unittests/linux_unittest.py
                    - remove_executables.py
                macosx.*:
                    - unittests/mac_unittest.py
                windows.*:
                    - unittests/win_unittest.py

tasks:
    mochitest-plain:
        description: "Mochitest plain run"
        treeherder-symbol: M()
        schedules-component: mochitest-plain
        loopback-video: true
        virtualization: virtual
        variants:
            - aab+no-fission
            - conditioned_profile
            - xorigin
            - no-fission
            - socketprocess_networking
            - headless
            - http3
            - http2
            - geckoview-fission-isolate-high-value
            - geckoview-no-fission-no-ship
            - inc-origin-init
        run-on-projects:
            by-variant:
                conditioned_profile:
                    by-test-platform:
                        .*-ccov.*: []
                        .*-asan.*: []
                        .*-wayland.*: []
                        linux2404-64(-shippable)?/opt: ['trunk']
                        windows11-64.*(-shippable)?(-qr)?/opt: []
                        default: []
                xorigin:
                    by-test-platform:
                        .*-asan.*: []
                        .*-wayland.*: []
                        windows.*-ccov.*: []
                        linux.*64(-shippable)?/.*: ['trunk']
                        macosx.*64(-shippable)?(-qr)?/.*: ['trunk']
                        windows11-64-24h2(-shippable)?(-qr)?/.*: ['trunk']
                        linux.*64-ccov/opt: ['mozilla-central']
                        android-em.*/debug-isolated-process: ['trunk']
                        android-em.*: ['trunk']
                        default: []
                socketprocess_networking:
                    by-test-platform:
                        .*-ccov.*: []
                        .*-asan.*: []
                        .*-wayland.*: []
                        linux2404-64/debug: ['autoland', 'mozilla-central']
                        default: []
                aab+no-fission:
                    by-test-platform:
                        android-em.*/debug: built-projects
                        default: []
                headless:
                    by-test-platform:
                        .*-wayland.*: []
                        linux2404-64.*: ['mozilla-central']
                        default: []
                no-fission:
                    by-test-platform:
                        android-em.*/debug-isolated-process: []
                        android.*: built-projects
                        linux2404-64/debug: ['mozilla-central']
                        linux2404-64-asan/opt: ['mozilla-central']
                        linux2404-64(-shippable)?/opt: ['mozilla-central']
                        default: []
                http3:
                    by-test-platform:
                        linux2404-64/debug: built-projects
                        default: []
                http2:
                    by-test-platform:
                        linux2404-64/debug: built-projects
                        default: []
                geckoview-fission-isolate-high-value:
                    by-test-platform:
                        android-em.*/debug-isolated-process: ['trunk']
                        android-em.*: built-projects
                        default: []
                geckoview-no-fission-no-ship:
                    by-test-platform:
                        android-em.*/debug-isolated-process: ['trunk']
                        android-em.*: built-projects
                        default: []
                inc-origin-init: []
                default:
                    by-test-platform:
                        android-em.*/debug-isolated-process: ['trunk']
                        android.*: built-projects
                        default: built-projects
        chunks:
            by-variant:
                inc-origin-init: dynamic
                default:
                    by-test-platform:
                        android.*/debug: 10
                        linux.*/debug: 16
                        linux.*64-tsan/opt: 20
                        .*-ccov.*: 10
                        .*-asan.*: 10
                        linux.*/opt: 8
                        windows.*/debug: 8
                        default: 5
        tier:
            by-variant:
                no-fission:
                    by-test-platform:
                        linux.*64.*: 2
                        default: default
                default: default
        instance-size:
            by-test-platform:
                linux.*64-asan/opt: xlarge-noscratch  # runs out of memory using 8GB
                linux.*64-tsan/opt: xlarge-noscratch  # runs out of memory using 8GB
                default: default
        max-run-time: 3600
        allow-software-gl-layers: false
        mozharness:
            mochitest-flavor: plain
            extra-options:
                by-test-platform:
                    android-em.*:
                        - --test-suite=mochitest-plain
                    default: []
            chunked:
                by-test-platform:
                    android-em.*: false
                    default: true
        fetches:
            toolchain:
                by-test-platform:
                    linux.*:
                        - linux64-node
                        - linux64-minidump-stackwalk
                        - linux64-fix-stacks
                    macosx.*-64.*:
                        - macosx64-node
                        - macosx64-minidump-stackwalk
                        - macosx64-fix-stacks
                    macosx.*-aarch64.*:
                        - macosx64-aarch64-node
                        - macosx64-aarch64-minidump-stackwalk
                        - macosx64-aarch64-fix-stacks
                    win.*-64.*:
                        - win64-node
                        - win32-minidump-stackwalk
                        - win32-fix-stacks
                    win.*32.*:
                        - win32-node
                        - win32-minidump-stackwalk
                        - win32-fix-stacks
                    android-em-14.*:
                        - android34-system-image-x86_64-linux
                        - android34-avd-x86_64-linux
                        - android-emulator-linux
                        - linux64-node
                        - linux64-minidump-stackwalk
                        - linux64-hostutils

    mochitest-a11y:
        description: "Mochitest a11y run"
        treeherder-symbol: M(a11y)
        schedules-component: mochitest-a11y
        test-manifest-loader: default  # ensure we don't run with manifest-scheduling
        loopback-video: true
        run-without-variant: false
        variants:
            - 1proc
            - socketprocess_networking+1proc
            - webrender-sw+1proc
        run-on-projects:
            by-variant:
                socketprocess_networking+1proc:
                    by-test-platform:
                        linux.*64/debug: ['autoland', 'mozilla-central']
                        default: []
                webrender-sw+1proc:
                    by-test-platform:
                        android-em.*/debug: built-projects
                        linux.*64/debug: built-projects
                        default: []
                1proc: built-projects
        mozharness:
            mochitest-flavor: a11y

    mochitest-browser-chrome:
        description: "Mochitest browser-chrome run"
        suite:
            name: mochitest-browser-chrome
        treeherder-symbol: M(bc)
        schedules-component: mochitest-browser-chrome
        loopback-video: true
        variants:
            - webrender-sw
            - webrender-sw+a11y-checks
            - socketprocess_networking
            - msix
            - vertical-tabs
            - inc-origin-init
            - trainhop-beta
            - trainhop-release
        run-on-projects:
            by-variant:
                trainhop-beta:
                    by-test-platform:
                        .*-wayland.*: []
                        .*-32.*: []
                        linux2404-64(-shippable)?/opt: ['trunk']
                        macosx.*-64(-shippable)?(-qr)?/opt: ['trunk']
                        windows11-64-24h2(-shippable)?/opt: ['trunk']
                        default: []
                trainhop-release:
                    by-test-platform:
                        .*-wayland.*: []
                        .*-32.*: []
                        linux2404-64(-shippable)?/opt: ['trunk']
                        macosx.*-64(-shippable)?(-qr)?/opt: ['trunk']
                        windows11-64-24h2(-shippable)?/opt: ['trunk']
                        default: []
                webrender-sw:
                    by-test-platform:
                        linux.*64/debug: ['all']
                        linux.*64-asan/opt: ['all']
                        linux.*64-tsan/opt: built-projects
                        linux.*64/opt: built-projects
                        linux.*64-devedition/opt: built-projects
                        linux.*64-shippable/opt: ['release']
                        .*-wayland.*: []  # will change to built-projects when greened up
                        default: []
                webrender-sw+a11y-checks:
                    by-test-platform:
                        linux.*64(-shippable)?/opt: ['trunk']
                        default: []
                socketprocess_networking:
                    by-test-platform:
                        .*-asan.*: []
                        .*-ccov.*: []
                        linux.*64(-shippable)?/.*: ['autoland', 'mozilla-central']
                        macosx.*64(-shippable)?(-qr)?/.*: ['autoland', 'mozilla-central']
                        windows1.*-64.*(-shippable)?/.*: ['autoland', 'mozilla-central']
                        default: []
                msix:
                    by-test-platform:
                        windows11-64.*: built-projects
                        default: []
                vertical-tabs:
                    by-test-platform:
                        .*-asan.*: []
                        .*-ccov.*: []
                        linux.*64(-shippable)?/.*: ['autoland', 'mozilla-central']
                        macosx.*64(-shippable)?(-qr)?/.*: ['autoland', 'mozilla-central']
                        windows1.*-64.*(-shippable)?/.*: ['autoland', 'mozilla-central']
                        default: []
                inc-origin-init: []
                default:
                    by-test-platform:
                        android.*: []
                        linux.*: []  # linux runs M-swr(bc), not M(bc)
                        default: built-projects
        tier:
            by-variant:
                trainhop-beta: 2
                trainhop-release: 2
                webrender-sw:
                    by-test-platform:
                        linux.*64-asan/opt: 1
                        linux.*64(-shippable)?/.*: 1
                        default: default
                default: default
        chunks:
            by-variant:
                trainhop-release: 1
                trainhop-beta: 1
                msix:
                    by-test-platform:
                        .*/debug: 16
                        default: 7
                vertical-tabs: dynamic
                inc-origin-init: dynamic
                default:
                    by-test-platform:
                        linux.*/debug: 16
                        linux.*64-asan/opt: 20
                        linux.*64-tsan/opt: 32
                        windows.*-asan.*/opt: 20
                        windows.*-ccov.*/.*: 14
                        macosx.*64.*/opt: 10
                        windows11.*/opt: 10
                        .*/debug: 12
                        default: 8
        max-run-time:
            by-variant:
                msix: 5400
                socketprocess_networking:
                    by-test-platform:
                        linux.*/debug: 7200
                        default: 5400
                default:
                    by-test-platform:
                        linux.*64-ccov/opt: 9000
                        linux.*64-tsan/opt: 10800
                        linux.*/opt: 5400
                        windows.*-ccov.*/.*: 10800
                        windows.*-asan.*/opt: 5400
                        .*/debug: 5400
                        default: 3600
        mozharness:
            mochitest-flavor: browser
            chunked: true
        instance-size:
            by-test-platform:
                linux.*64-asan/opt: xlarge-noscratch  # runs out of memory frequently
                default: default
        allow-software-gl-layers: false
        fetches:
            fetch:
                - ort.jsep.wasm

    mochitest-browser-chrome-failures:
        description: "Mochitest browser-chrome failures run"
        suite:
            name: mochitest-browser-chrome
        treeherder-symbol: M-f(bc)
        schedules-component: mochitest-browser-chrome
        loopback-video: true
        variants:
            - webrender-sw
        run-on-projects:
            by-test-platform:
                android.*: []
                .*-wayland.*: []  # will change to built-projects when greened up
                default: []
        tier: 3
        chunks: 2
        max-run-time:
            by-test-platform:
                linux.*-wayland.*/opt: 1800
                linux.*-wayland.*/debug: 3600
                default: 3600
        mozharness:
            mochitest-flavor: browser
            chunked: true
            extra-options:
                by-test-platform:
                    linux.*-wayland.*:
                        - --run-failures="os == 'linux' && os_version == '22.04'"
                        - --timeout-as-pass
                        - --crash-as-pass
        instance-size: default
        allow-software-gl-layers: false

    mochitest-browser-a11y:
        description: "Mochitest browser-a11y run"
        suite:
            name: mochitest-browser-a11y
        treeherder-symbol: M(ba)
        schedules-component: mochitest-browser-a11y
        loopback-video: true
        run-on-projects:
            by-test-platform:
                android.*: []
                .*-wayland.*: []
                default: built-projects
        tier: default
        max-run-time:
            by-test-platform:
                .*-tsan.*: 2700
                linux.*/debug: 2700
                default: 1800
        mozharness:
            mochitest-flavor: browser
            chunked:
                by-test-platform:
                    .*-tsan.*: true
                    default: false
        chunks:
            by-test-platform:
                .*-tsan.*: 2
                .*-asan.*: 2
                default: 1
        instance-size: default
        allow-software-gl-layers: false
        virtualization: virtual

    mochitest-browser-media:
        description: "Mochitest browser media"
        suite:
            name: mochitest-browser-media
        treeherder-symbol: M(mda-bc)
        schedules-component: mochitest-browser-media
        loopback-video: true
        test-manifest-loader: null
        variants: ["wmf-media-engine"]
        run-on-projects:
            by-variant:
                wmf-media-engine:
                    by-test-platform:
                        .*-asan.*: []
                        windows11-64.*/debug: []  # Bug 1805736
                        windows1.*-64.*: ['autoland', 'mozilla-central']
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        default: built-projects
        tier: default
        max-run-time:
            by-test-platform:
                .*-tsan.*: 1800
                default: 1200
        mozharness:
            mochitest-flavor: browser
        instance-size: default
        allow-software-gl-layers: false
        virtualization: virtual

    mochitest-browser-screenshots:
        description: "Browser Screenshots"
        suite:
            name: mochitest-browser-screenshots
        treeherder-symbol: M(ss)
        loopback-video: true
        test-manifest-loader: null  # don't load tests in the taskgraph
        variants: ["no-fission"]
        run-on-projects:
            by-test-platform:
                linux2404-64.*/opt: ['trunk']
                default: []
        max-run-time: 3600
        mozharness:
            mochitest-flavor: browser
        allow-software-gl-layers: false

    mochitest-browser-translations:
        description: "Mochitest browser translations"
        suite:
            name: mochitest-browser-translations
        treeherder-symbol: M(tr8ns)
        schedules-component: mochitest-browser-translations
        loopback-video: true
        test-manifest-loader: null
        run-on-projects:
            by-test-platform:
                android.*: []
                default: built-projects
        tier: default
        max-run-time:
            by-test-platform:
                .*-asan.*: 1800
                .*-tsan.*: 2400
                .*-ccov.*: 2400
                win.*/debug: 1800
                default: 1200
        mozharness:
            mochitest-flavor: browser
        instance-size: default
        allow-software-gl-layers: false
        virtualization: virtual
        fetches:
            fetch:
                - tr8ns.inference
                - tr8ns.T.esen.lex
                - tr8ns.T.esen.model
                - tr8ns.T.esen.vocab

    mochitest-chrome:
        description: "Mochitest chrome run"
        treeherder-symbol: M(c)
        schedules-component: mochitest-chrome
        loopback-video: true
        run-without-variant: false
        variants:
            - 1proc
            - socketprocess_networking+1proc
            - webrender-sw+1proc
            - inc-origin-init
        run-on-projects:
            by-variant:
                socketprocess_networking+1proc:
                    by-test-platform:
                        .*-asan.*: []
                        .*-ccov.*: []
                        linux2404-64/debug: ['autoland', 'mozilla-central']
                        default: []
                webrender-sw+1proc:
                    by-test-platform:
                        android-em.*/debug: built-projects
                        linux.*64/debug: built-projects
                        default: []
                1proc:
                    by-test-platform:
                        .*-wayland.*: []
                        default: built-projects
                inc-origin-init: []
        chunks:
            by-variant:
                inc-origin-init: dynamic
                default:
                    by-test-platform:
                        .*-tsan.*/opt: 6
                        default: 3
        max-run-time: 3600
        mozharness:
            mochitest-flavor: chrome
            chunked: true
        instance-size:
            by-test-platform:
                linux.*64-tsan/opt: xlarge-noscratch  # runs out of memory otherwise using 8GB
                default: default

    mochitest-devtools-chrome:
        description: "Mochitest devtools-chrome run"
        suite:
            name: mochitest-devtools-chrome
        schedules-component: mochitest-browser-chrome
        treeherder-symbol: M(dt)
        loopback-video: true
        variants:
            - a11y-checks
            - socketprocess_networking
            - http3
        run-on-projects:
            by-variant:
                a11y-checks:
                    by-test-platform:
                        linux.*64(-shippable)?/opt: ['trunk']
                        default: []
                http3:
                    by-test-platform:
                        linux2404-64/debug: built-projects
                        default: []
                socketprocess_networking:
                    by-test-platform:
                        .*-asan.*: []
                        .*-ccov.*: []
                        linux2404-64/debug: ['autoland', 'mozilla-central']
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        .*-wayland.*: []
                        linux.*64-ccov/opt: []
                        default: built-projects
        tier: default
        max-run-time:
            by-test-platform:
                windows.*-ccov.*/.*: 10800
                linux.*64-ccov.*/.*: 7200
                linux.*64-tsan/opt: 7200
                default: 5400
        chunks:
            by-test-platform:
                .*-ccov.*: 12
                linux.*-wayland.*/debug: 14
                linux.*64/debug: 14
                macosx.*64(-qr)?/debug: 8
                win.*/debug: 8
                .*-asan/opt: 8
                .*-tsan/opt: 16
                default: 5
        mozharness:
            mochitest-flavor: chrome
            chunked: true
        instance-size:
            by-test-platform:
                linux.*64-asan/opt: xlarge-noscratch  # runs out of memory otherwise using 8GB
                linux.*64-tsan/opt: xlarge-noscratch  # runs out of memory otherwise using 8GB
                default: default
        # Bug 1296086: high number of intermittents observed with software GL and large instances
        allow-software-gl-layers: false
        fetches:
            toolchain:
                by-test-platform:
                    linux.*:
                        - linux64-node
                        - linux64-minidump-stackwalk
                        - linux64-fix-stacks
                    macosx.*-64.*:
                        - macosx64-node
                        - macosx64-minidump-stackwalk
                        - macosx64-fix-stacks
                    macosx.*-aarch64.*:
                        - macosx64-aarch64-node
                        - macosx64-aarch64-minidump-stackwalk
                        - macosx64-aarch64-fix-stacks
                    win.*-64.*:
                        - win64-node
                        - win32-minidump-stackwalk
                        - win32-fix-stacks
                    win.*32.*:
                        - win32-node
                        - win32-minidump-stackwalk
                        - win32-fix-stacks
                    android-em-14.*:
                        - android34-system-image-x86_64-linux
                        - android34-avd-x86_64-linux
                        - android-emulator-linux
                        - linux64-node
                        - linux64-minidump-stackwalk
                        - linux64-hostutils


    mochitest-devtools-chrome-failures:
        description: "Mochitest devtools-chrome run"
        suite:
            name: mochitest-devtools-chrome
        schedules-component: mochitest-browser-chrome
        treeherder-symbol: M-f(dt)
        loopback-video: true
        variants:
            - webrender-sw
        run-on-projects:
            by-test-platform:
                android.*: []
                .*-wayland.*: []  # will change to built-projects when greened up
                default: []
        tier: 3
        chunks: 2
        max-run-time:
            by-test-platform:
                linux.*-wayland.*/opt: 1800
                linux.*-wayland.*/debug: 3600
                default: 3600
        mozharness:
            mochitest-flavor: chrome
            chunked: true
            extra-options:
                by-test-platform:
                    linux.*-wayland.*:
                        - --run-failures="os == 'linux' && os_version == '22.04'"
                        - --timeout-as-pass
                        - --crash-as-pass
        instance-size: default
        allow-software-gl-layers: false


    mochitest-plain-gpu:
        description: "Mochitest plain GPU run"
        suite:
            name: mochitest-plain-gpu
        treeherder-symbol: M(gpu)
        schedules-component: mochitest-plain
        loopback-video: true
        variants:
            - no-fission
            - webrender-sw+no-fission
            - webrender-sw
        run-on-projects:
            by-variant:
                webrender-sw+no-fission:
                    by-test-platform:
                        android-em.*/debug: built-projects
                        linux.*-asan.*: ['mozilla-central']
                        linux.*64/debug: ['mozilla-central']
                        linux.*64(-shippable)?/opt: ['mozilla-central']
                        default: []
                webrender-sw:
                    by-test-platform:
                        linux.*64/debug: built-projects
                        default: []
                no-fission:
                    by-test-platform:
                        android-em.*/debug-isolated-process: []
                        linux.*64-ccov/opt: []
                        .*-tsan/opt: []
                        .*-wayland.*: []
                        linux.*: ['mozilla-central']  # linux opt/debug/asan
                        android.*: built-projects
                        default: []
                default:
                    by-test-platform:
                        android-em.*/debug-isolated-process: []
                        default: built-projects
        virtualization: virtual-with-gpu
        tier:
            by-variant:
                no-fission:
                    by-test-platform:
                        linux.*64.*: 2
                        default: default
                default:
                    by-test-platform:
                        android-em.*/debug-isolated-process: 3
                        default: default
        mozharness:
            mochitest-flavor: plain
            extra-options:
                by-test-platform:
                    android.*:
                        # note that Android runs fewer suites than other platforms
                        - --test-suite=mochitest-plain-gpu
                    default:
                        - --mochitest-suite=mochitest-plain-gpu
        instance-size:
            by-test-platform:
                linux.*64-tsan/opt: xlarge-noscratch  # runs out of memory otherwise using 8GB
                default: default

    mochitest-chrome-gpu:
        description: "Mochitest chrome GPU run"
        suite:
            name: mochitest-chrome-gpu
        treeherder-symbol: M(gpu-c)
        loopback-video: true
        virtualization: virtual-with-gpu
        run-without-variant: false
        variants:
            - 1proc
            - socketprocess_networking+1proc
            - webrender-sw+1proc
        run-on-projects:
            by-variant:
                socketprocess_networking+1proc: []
                webrender-sw+1proc:
                    by-test-platform:
                        android-em.*/debug: built-projects
                        linux.*64/debug: built-projects
                        default: []
                1proc:
                    by-test-platform:
                        android.*/.*: []
                        default: built-projects
        tier: default
        mozharness:
            mochitest-flavor: chrome
            extra-options:
                by-test-platform:
                    android.*:
                        # note that Android runs fewer suites than other platforms
                        - --test-suite=mochitest-chrome-gpu
                    default:
                        - --mochitest-suite=mochitest-chrome-gpu
        instance-size:
            by-test-platform:
                linux.*64-tsan/opt: xlarge-noscratch  # runs out of memory using 8GB of memory
                default: default

    mochitest-media:
        description: "Mochitest media run"
        treeherder-symbol: M(mda)
        schedules-component: mochitest-plain
        max-run-time:
            by-test-platform:
                windows.*-ccov.*: 7200
                linux.*64-tsan/opt: 7200
                default: 5400
        variants:
            - media-gpu
            - no-fission
            - no-gpu-process
            - socketprocess+no-fission
            - socketprocess
            - webrender-sw+no-fission
            - webrender-sw
            - wmf-media-engine
            - msix
        run-on-projects:
            by-variant:
                socketprocess+no-fission:
                    by-test-platform:
                        .*hw-ref.*: []
                        android-em-14.*/debug: []  # Bug 1984064
                        android-em.*/debug: ['autoland', 'mozilla-central']
                        android-hw-.*-aarch64(-qr)?/debug: built-projects
                        linux2404-64/debug: ['mozilla-central']
                        linux2404-64(-shippable)/opt: ['mozilla-central']
                        linux2404-64-asan/opt: ['mozilla-central']
                        default: []
                socketprocess:
                    by-test-platform:
                        android.*: []
                        windows.*-ccov.*: []
                        .*hw-ref.*: []
                        linux.*64-asan/opt: built-projects
                        linux.*64-devedition/.*: built-projects
                        linux.*64(-shippable)?/opt: built-projects
                        linux.*64/debug: built-projects
                        linux.*64-tsan/opt: ['autoland', 'mozilla-central']
                        macosx.*-64-devedition(-qr)?/.*: built-projects
                        macosx.*-64(-shippable)?(-qr)?/.*: built-projects
                        windows.*-asan.*: ['autoland', 'mozilla-central']
                        windows1.*: built-projects
                        default: []
                webrender-sw+no-fission:
                    by-test-platform:
                        .*hw-ref.*: []
                        android-em-14.*/debug: []  # Bug 1984064
                        android-em.*/debug: ['autoland', 'mozilla-central']
                        linux2404-64/.*: ['mozilla-central']
                        linux2404-64-shippable/opt: ['mozilla-central']
                        linux2404-64-asan/opt: ['mozilla-central']
                        default: []
                webrender-sw:
                    by-test-platform:
                        android.*: []
                        .*hw-ref.*: []
                        linux2404-64/debug: ['autoland', 'mozilla-central']
                        default: []
                no-fission:
                    by-test-platform:
                        android-hw-.*/opt: []
                        .*hw-ref.*: []
                        android-hw-.*-arm7.*/(?:debug)?: ['trunk', 'mozilla-beta', 'mozilla-release']
                        android-em-14.*/debug: []  # Bug 1984064
                        android-em.*/debug-isolated-process: []
                        android.*: built-projects
                        linux2404-64/.*: ['mozilla-central']
                        linux2404-64-shippable/opt: ['mozilla-central']
                        linux2404-64-asan/opt: ['mozilla-central']
                        default: []
                wmf-media-engine:
                    by-test-platform:
                        .*hw-ref.*: []
                        windows1.*-ccov.*: []
                        windows1.*64.*: ['autoland', 'mozilla-central']
                        default: []
                msix:
                    by-test-platform:
                        .*hw-ref.*: []
                        windows11-64-.*-shippable.*/opt: built-projects
                        windows11-64-.*: ['autoland']
                        default: []
                media-gpu:
                    by-test-platform:
                        windows11.*hw-ref.*: ['autoland', 'mozilla-central', 'mozilla-beta']
                        macosx.*64(-shippable)?(-qr)?/.*: ['autoland', 'mozilla-central', 'mozilla-beta']
                        android-hw-.*: ['autoland', 'mozilla-central', 'mozilla-beta']
                        default: []
                default:
                    by-test-platform:
                        .*hw-ref.*: []
                        android-hw.*/opt: []
                        android-em.*/debug-isolated-process: []
                        android-em-14.*/debug: []  # Bug 1984064
                        android.*: built-projects
                        linux.*-asan/opt: []
                        linux.*-ccov/opt: []
                        .*-32.*: built-projects
                        windows11.*: built-projects
                        linux.*wayland.*: []
                        macosx1470.*: []
                        (?!.*-qr).*: []
                        default: built-projects
        loopback-video: true
        chunks:
            by-variant:
                wmf-media-engine: 1
                media-gpu: 1
                default:
                    by-test-platform:
                        android.*/opt: 1
                        macosx.*/opt: 1
                        windows11-64-24h2-asan/opt: 2
                        windows11-.*/opt: 1
                        linux.*/debug: 3
                        linux.*64-tsan/opt: 5
                        default: 2
        mozharness:
            mochitest-flavor: plain
            chunked:
                by-test-platform:
                    android.*: false
                    macosx.*64.*: false
                    windows1.*: false
                    default: true
            extra-options:
                by-test-platform:
                    android-em.*:
                        - --setpref=gfx.canvas.accelerated=false
                    default: []
        tier:
            by-variant:
                no-fission:
                    by-test-platform:
                        linux.*64.*: 2
                        default: default
                webrender-sw+no-fission:
                    by-test-platform:
                        linux.*64.*: 2
                        default: default
                socketprocess+no-fission:
                    by-test-platform:
                        linux.*64.*: 2
                        default: default
                default:
                    by-test-platform:
                        .*-ccov.*: 2
                        android-em.*/debug-isolated-process: 2
                        android-em.*: 1
                        android-hw.*: 1
                        default: default
        worker-type:
            by-variant:
                media-gpu:
                    by-test-platform:
                        linux.*: t-linux-talos-1804
                        default: default
                default: default

    mochitest-valgrind:
        description: "Mochitest plain Valgrind run"
        suite:
            name: mochitest-valgrind-plain
        treeherder-symbol: M-V()
        run-on-projects: []
        test-manifest-loader: null  # don't load tests in the taskgraph
        tier: 3
        loopback-video: true
        chunks: 40
        max-run-time: 14400
        run-without-variant: false
        variants: ["1proc"]
        allow-software-gl-layers: false
        mozharness:
            mochitest-flavor: plain
            chunked: true

    mochitest-webgl1-core:
        description: "Mochitest webgl1-core run"
        treeherder-symbol: M(gl1c)
        schedules-component: mochitest-plain
        virtualization: virtual-with-gpu
        test-manifest-loader: null  # don't load tests in the taskgraph
        loopback-video: true
        max-run-time: 1800
        variants:
            - no-fission
            - webrender-sw+no-fission
            - webrender-sw
        run-on-projects:
            by-variant:
                webrender-sw+no-fission:
                    by-test-platform:
                        linux.*64/debug: ['trunk']
                        default: []
                webrender-sw:
                    by-test-platform:
                        linux.*64/debug: built-projects
                        default: []
                no-fission:
                    by-test-platform:
                        android-hw-.*(?<!-shippable)(-qr)?/opt: ['mozilla-central', 'mozilla-beta', 'mozilla-release']
                        android-hw.*aarch.*-shippable(-qr)?/opt: ['mozilla-central']
                        android-hw.*aarch.*(-qr)?/debug: ['mozilla-central']
                        linux2404-64/debug: ['trunk']
                        linux2404-64(-shippable)?/opt: ['trunk']
                        linux2404-64-asan/opt: ['trunk']
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        .*-tsan.*: []
                        default: built-projects
        # Bug 1296733: llvmpipe with mesa 9.2.1 lacks thread safety
        allow-software-gl-layers: false
        mozharness:
            mochitest-flavor: plain

    mochitest-webgl1-ext:
        description: "Mochitest webgl1-ext run"
        treeherder-symbol: M(gl1e)
        schedules-component: mochitest-plain
        virtualization: virtual-with-gpu
        test-manifest-loader: null  # don't load tests in the taskgraph
        loopback-video: true
        max-run-time: 2700
        variants:
            - no-fission
            - webrender-sw+no-fission
            - webrender-sw
        run-on-projects:
            by-variant:
                webrender-sw+no-fission:
                    by-test-platform:
                        linux.*64/debug: ['trunk']
                        default: []
                webrender-sw:
                    by-test-platform:
                        linux.*64/debug: built-projects
                        default: []
                no-fission:
                    by-test-platform:
                        android-hw-.*(?<!-shippable)(-qr)?/opt: ['mozilla-central', 'mozilla-beta', 'mozilla-release']
                        android-hw.*aarch.*-shippable(-qr)?/opt: ['mozilla-central']
                        android-hw.*aarch.*(-qr)?/debug: ['mozilla-central']
                        linux2404-64/.*: ['trunk']
                        linux2404-64-shippable/opt: ['trunk']
                        linux2404-64-asan/opt: ['trunk']
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        .*-tsan.*: []
                        default: built-projects
        # Bug 1296733: llvmpipe with mesa 9.2.1 lacks thread safety
        allow-software-gl-layers: false
        mozharness:
            mochitest-flavor: plain

    mochitest-webgl2-core:
        description: "Mochitest webgl2-core run"
        treeherder-symbol: M(gl2c)
        schedules-component: mochitest-plain
        virtualization: virtual-with-gpu
        chunks:
            by-test-platform:
                android.*: 2
                default: 1
        test-manifest-loader: null  # don't load tests in the taskgraph
        loopback-video: true
        max-run-time: 1800
        variants:
            - no-fission
            - webrender-sw+no-fission
            - webrender-sw
        run-on-projects:
            by-variant:
                webrender-sw+no-fission:
                    by-test-platform:
                        linux.*64/debug: ['trunk']
                        default: []
                webrender-sw:
                    by-test-platform:
                        linux.*64/debug: built-projects
                        default: []
                no-fission:
                    by-test-platform:
                        android-hw-.*(?<!-shippable)(-qr)?/opt: ['mozilla-central', 'mozilla-beta', 'mozilla-release']
                        android-hw.*aarch.*-shippable(-qr)?/opt: ['mozilla-central']
                        android-hw.*aarch.*(-qr)?/debug: ['mozilla-central']
                        linux2404-64/.*: ['trunk']
                        linux2404-64-shippable/opt: ['trunk']
                        linux2404-64-asan/opt: ['trunk']
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        .*-tsan.*: []
                        .*-wayland.*: []
                        default: built-projects
        # Bug 1296733: llvmpipe with mesa 9.2.1 lacks thread safety
        allow-software-gl-layers: false
        mozharness:
            mochitest-flavor: plain
            chunked: true

    mochitest-webgl2-ext:
        description: "Mochitest webgl2-ext run"
        treeherder-symbol: M(gl2e)
        schedules-component: mochitest-plain
        virtualization: virtual-with-gpu
        variants:
            - no-fission
            - webrender-sw+no-fission
            - webrender-sw
        run-on-projects:
            by-variant:
                webrender-sw+no-fission:
                    by-test-platform:
                        linux.*64/debug: ["trunk"]
                        default: []
                webrender-sw:
                    by-test-platform:
                        linux.*64/debug: built-projects
                        default: []
                no-fission:
                    by-test-platform:
                        linux2404-64/debug: ['trunk']
                        linux2404-64(-shippable|-asan)?/opt: ['trunk']
                        android.*: built-projects
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        .*-tsan.*: []
                        default: built-projects
        chunks: 4
        test-manifest-loader: null  # don't load tests in the taskgraph
        loopback-video: true
        max-run-time: 2700
        # Bug 1296733: llvmpipe with mesa 9.2.1 lacks thread safety
        allow-software-gl-layers: false
        mozharness:
            mochitest-flavor: plain
            chunked: true

    mochitest-webgl2-deqp:
        description: "Mochitest webgl2-deqp run"
        treeherder-symbol: M(gl2d)
        schedules-component: mochitest-plain
        virtualization: virtual-with-gpu
        variants:
            - webrender-sw
        run-on-projects: []  # Don't run this for now.
        chunks: 4
        loopback-video: true
        max-run-time: 1800
        # Bug 1296733: llvmpipe with mesa 9.2.1 lacks thread safety
        allow-software-gl-layers: false
        mozharness:
            mochitest-flavor: plain
            chunked: true

    mochitest-webgpu:
        description: "Mochitest webgpu run"
        treeherder-symbol: M(webgpu)
        schedules-component: mochitest-plain
        virtualization: virtual-with-gpu
        loopback-video: true
        variants:
            - no-fission
            - webrender-sw+no-fission
        run-on-projects:
            by-variant:
                webrender-sw+no-fission:
                    by-test-platform:
                        android-em.*/debug: ["trunk"]
                        default: []
                no-fission:
                    by-test-platform:
                        linux2204-64/.*: ['trunk']
                        linux2204-64-shippable/opt: ['trunk']
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        # Things like asan/tsan/32bit are restricted to --full
                        # via UNCOMMON_TRY_TASK_LABELS
                        # in taskcluster/gecko_taskgraph/target_tasks.py.
                        default: ['trunk']
        max-run-time: 1800
        mozharness:
            mochitest-flavor: plain

    mochitest-remote:
        description: "Mochitest for the remote agent (/remote folder)"
        suite:
            name: mochitest-remote
        treeherder-symbol: M(remote)
        loopback-video: true
        variants:
            - no-fission
            - socketprocess_networking
        run-on-projects:
            by-variant:
                socketprocess_networking:
                    by-test-platform:
                        .*-asan.*: []
                        .*-ccov.*: []
                        linux2404-64/debug: ['autoland', 'mozilla-central']
                        default: []
                no-fission:
                    by-test-platform:
                        linux2404-64/.*: ['trunk']
                        linux2404-64-shippable/opt: ['trunk']
                        linux2404-64-asan/opt: ['trunk']
                        default: []
                default:
                    by-test-platform:
                        android.*: []
                        default: built-projects
        tier: default
        max-run-time: 5400
        mozharness:
            mochitest-flavor: browser
            extra-options:
                - --setpref=remote.log.level=Trace
        virtualization: virtual
        instance-size:
            by-test-platform:
                linux.*64-asan/opt: xlarge-noscratch  # runs out of memory otherwise using 8GB
                default: default
