# 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/.
---
task-defaults:
    suite:
        category: mochitest
    target:
        by-test-platform:
            android-em-7.*: geckoview-test_runner.apk
            android-hw.*: geckoview-test_runner.apk
            windows11-64-2009.*:
                by-variant:
                    msix: target.installer.msix
                    default: null
            default: null
    tier:
        by-variant:
            xorigin:
                by-test-platform:
                    linux.*64.*-qr/debug: 1
                    default: 2
            default:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug-isolated-process: 3
                    default: default
    mozharness:
        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-7.*:
                    - android/android_common.py
                    - android/android-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

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-ship
    run-on-projects:
        by-variant:
            conditioned_profile:
                by-test-platform:
                    .*(asan|ccov|wayland).*: []
                    linux1804-64(-shippable)?-qr/opt: ['trunk']
                    windows11-64.*(-shippable)?-qr/opt: ['trunk']
                    default: []
            xorigin:
                by-test-platform:
                    .*(asan|wayland).*: []
                    windows.*ccov.*: []
                    (linux.*64|macosx.*64|windows11.*)(-shippable)?-qr/(opt|debug): ['trunk']
                    windows.*64-ccov-qr/opt: ['mozilla-central']
                    linux.*64-ccov-qr/opt: ['mozilla-central']
                    android-em-7.0-x86_64-qr/debug-isolated-process: []
                    android-em.*: ['trunk']
                    default: []
            socketprocess_networking:
                by-test-platform:
                    .*(asan|ccov|wayland).*: []
                    linux.*64.*(-shippable)?-qr/debug: ['autoland', 'mozilla-central']
                    default: []
            aab+no-fission:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug: built-projects
                    default: []
            headless:
                by-test-platform:
                    .*wayland.*: []
                    linux1804-64.*: ['mozilla-central']
                    default: []
            no-fission:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug-isolated-process: []
                    android.*: built-projects
                    linux1804-64-qr/debug: ['mozilla-central']
                    linux1804-64(-shippable|-asan)?-qr/opt: ['mozilla-central']
                    default: []
            http3:
                by-test-platform:
                    linux1804-64-qr/debug: built-projects
                    default: []
            http2:
                by-test-platform:
                    linux1804-64-qr/debug: built-projects
                    default: []
            geckoview-fission-isolate-high-value:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug-isolated-process: []
                    android-em.*: built-projects
                    default: []
            geckoview-no-fission-ship:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug-isolated-process: []
                    android-em.*: built-projects
                    default: []
            default:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug-isolated-process: []
                    android.*: built-projects
                    default: built-projects
    chunks:
        by-test-platform:
            android.*/debug: 10
            linux.*/debug: 16
            linux.*64-tsan-qr/opt: 20
            .*(asan|ccov).*: 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-[at]san-qr/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.*:
                    - macosx64-node
                    - macosx64-minidump-stackwalk
                    - macosx64-fix-stacks
                win.*-64.*:
                    - win64-node
                    - win32-minidump-stackwalk
                    - win32-fix-stacks
                win.*32.*:
                    - win32-node
                    - win32-minidump-stackwalk
                    - win32-fix-stacks
                android-em-7.*:
                    - android-system-image-x86_64-linux
                    - android-avd-x86_64-linux
                    - android-emulator-linux
                    - linux64-node
                    - linux64-minidump-stackwalk
                    - linux64-hostutils
    worker-type:
        by-test-platform:
            .*wayland.*: t-linux-wayland-vm
            default: default

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-qr/debug: ['autoland', 'mozilla-central']
                    default: []
            webrender-sw+1proc:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug: built-projects
                    linux.*64-qr/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
    run-on-projects:
        by-variant:
            webrender-sw:
                by-test-platform:
                    linux.*64(-asan)?-qr/(opt|debug): ['all']
                    linux.*64-tsan-qr/opt: built-projects
                    linux.*64-shippable-qr/opt: ['release']
                    linux.*64(-shippable)?-qr/opt: built-projects
                    linux.*64-devedition-qr/opt: built-projects
                    .*wayland.*: []  # will change to built-projects when greened up
                    default: []
            webrender-sw+a11y-checks:
                by-test-platform:
                    linux.*64(-shippable)?-qr/opt: ['trunk']
                    default: []
            socketprocess_networking:
                by-test-platform:
                    .*asan.*: []
                    .*ccov.*: []
                    (linux.*64|macosx.*64|windows1.*-64.*)(-shippable)?-qr/(opt|debug): ['autoland', 'mozilla-central']
                    default: []
            msix:
                by-test-platform:
                    windows11-64-2009-qr/debug: built-projects
                    windows11-64-2009(-shippable)?-qr/opt: built-projects
                    default: []
            default:
                by-test-platform:
                    android.*: []
                    linux.*: []  # linux runs M-swr(bc), not M(bc)
                    default: built-projects
    tier:
        by-variant:
            webrender-sw:
                by-test-platform:
                    linux.*64(-asan|-shippable)?-qr/(opt|debug): 1
                    default: default
            default: default
    chunks:
        by-variant:
            msix:
                by-test-platform:
                    .*/debug: 16
                    default: 7
            default:
                by-test-platform:
                    linux.*-qr/debug: 16
                    linux.*64-asan-qr/opt: 16
                    linux.*64-tsan-qr/opt: 32
                    macosx.*64.*/opt: 10
                    windows11-32.*/opt: 10
                    windows.*-ccov.*/.*: 14
                    windows.*-asan-qr/opt: 14
                    .*/debug: 12
                    default: 8
    max-run-time:
        by-variant:
            msix: 5400
            socketprocess_networking:
                by-test-platform:
                    linux.*-qr/debug: 7200
                    default: 5400
            default:
                by-test-platform:
                    linux.*64-ccov.*/.*: 9000
                    linux.*64-tsan-qr/opt: 10800
                    linux.*-qr/opt: 5400
                    macosx.*64-ccov.*/.*: 10800
                    windows.*-ccov.*/.*: 10800
                    windows.*-asan-qr/opt: 5400
                    .*/debug: 5400
                    default: 3600
    mozharness:
        mochitest-flavor: browser
        chunked: true
    instance-size:
        by-test-platform:
            linux.*64-asan-qr/opt: xlarge-noscratch  # runs out of memory frequently
            default: default
    allow-software-gl-layers: false

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:
            linux1804-64.*/opt: ['trunk']
            default: []
    max-run-time: 3600
    mozharness:
        mochitest-flavor: browser
    allow-software-gl-layers: false

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
    run-on-projects:
        by-variant:
            socketprocess_networking+1proc:
                by-test-platform:
                    .*asan.*: []
                    .*ccov.*: []
                    linux.*64.*(-shippable)?-qr/debug: ['autoland', 'mozilla-central']
                    default: []
            webrender-sw+1proc:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug: built-projects
                    linux.*64-qr/debug: built-projects
                    default: []
            1proc:
                by-test-platform:
                    .*wayland.*: []
                    default: built-projects
    chunks:
        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-qr/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)?-qr/opt: ['trunk']
                    default: []
            http3:
                by-test-platform:
                    linux1804-64-qr/debug: built-projects
                    default: []
            socketprocess_networking:
                by-test-platform:
                    .*asan.*: []
                    .*ccov.*: []
                    linux.*64.*(-shippable)?-qr/debug: ['autoland', 'mozilla-central']
                    default: []
            default:
                by-test-platform:
                    android.*: []
                    .*wayland.*: []
                    linux.*64-ccov-qr/opt: []
                    default: built-projects
    tier: default
    max-run-time:
        by-test-platform:
            windows.*-ccov.*/.*: 10800
            macosx.*64-ccov.*/.*: 9000
            linux.*64-ccov.*/.*: 7200
            linux.*64-tsan-qr/opt: 7200
            default: 5400
    chunks:
        by-test-platform:
            .*-ccov.*/.*: 12
            linux.*wayland.*/debug: 14
            linux.*64-qr/debug: 14
            macosx.*64-qr/debug: 8
            .*-asan(-qr)?/opt: 8
            .*-tsan-qr/opt: 16
            default: 5
    mozharness:
        mochitest-flavor: chrome
        chunked: true
    instance-size:
        by-test-platform:
            linux.*64-[at]san(-qr)?/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.*:
                    - macosx64-node
                    - macosx64-minidump-stackwalk
                    - macosx64-fix-stacks
                win.*-64.*:
                    - win64-node
                    - win32-minidump-stackwalk
                    - win32-fix-stacks
                win.*32.*:
                    - win32-node
                    - win32-minidump-stackwalk
                    - win32-fix-stacks
                android-em-7.*:
                    - android-system-image-x86_64-linux
                    - android-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-7.0-x86_64-qr/debug: built-projects
                    linux.*asan.*: ['mozilla-central']
                    linux.*64(-shippable)?-qr/(opt|debug): ['mozilla-central']
                    default: []
            webrender-sw:
                by-test-platform:
                    linux.*64-qr/debug: built-projects
                    default: []
            no-fission:
                by-test-platform:
                    android-em-7.0-x86_64-qr/debug-isolated-process: []
                    linux.*64-ccov-qr/opt: []
                    linux1804-32.*: []
                    .*-tsan-qr/opt: []
                    .*wayland.*: []
                    linux.*: ['mozilla-central']  # linux opt/debug/asan
                    android.*: built-projects
                    default: []
            default:
                by-test-platform:
                    android-em-7.0-x86_64-qr/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-7.0-x86_64-qr/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-qr/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-7.0-x86_64-qr/debug: built-projects
                    linux.*64-qr/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-qr/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
            macosx.*64-ccov.*/.*: 7200
            linux.*64-tsan-qr/opt: 7200
            default: 5400
    variants:
        - media-gpu
        - no-fission
        - socketprocess+no-fission
        - socketprocess
        - webgl-ipc
        - webrender-sw+no-fission
        - webrender-sw
        - wmf-media-engine
        - msix
    run-on-projects:
        by-variant:
            webgl-ipc:
                by-test-platform:
                    android.*: []
                    windows.*ccov.*: []
                    .*hw-ref.*: []
                    linux.*64(-shippable|-asan|-tsan)?-qr/opt: ['autoland', 'mozilla-central']
                    macosx.*-64(-shippable)?-qr/(opt|debug): ['autoland', 'mozilla-central']
                    windows1.*(-shippable)?-qr/(opt|debug): ['autoland', 'mozilla-central']
                    windows.*-asan-qr/opt: ['autoland', 'mozilla-central']
                    default: []
            socketprocess+no-fission:
                by-test-platform:
                    .*hw-ref.*: []
                    android-em-7.0-x86_64-qr/debug: ['autoland', 'mozilla-central']
                    android-hw-.*-aarch64-qr/debug: built-projects
                    linux1804-64-qr/debug: ['mozilla-central']
                    linux1804-64(-shippable|-asan)?-qr/opt: ['mozilla-central']
                    default: []
            socketprocess:
                by-test-platform:
                    android.*: []
                    windows.*ccov.*: []
                    .*hw-ref.*: []
                    linux.*64(-asan|-devedition|-shippable)?-qr/(opt|debug): built-projects
                    linux.*64-tsan-qr/opt: ['autoland', 'mozilla-central']
                    macosx.*-64(-devedition|-shippable)?-qr/(opt|debug): built-projects
                    windows1.*(-devedition|-shippable)?-qr/(opt|debug): built-projects
                    windows.*-asan-qr/opt: ['autoland', 'mozilla-central']
                    default: []
            webrender-sw+no-fission:
                by-test-platform:
                    .*hw-ref.*: []
                    android-em-7.0-x86_64-qr/debug: ['autoland', 'mozilla-central']
                    linux1804-64-qr/debug: ['mozilla-central']
                    linux1804-64(-shippable|-asan)?-qr/opt: ['mozilla-central']
                    default: []
            webrender-sw:
                by-test-platform:
                    android.*: []
                    .*hw-ref.*: []
                    linux1804-64-qr/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-7.0-x86_64-qr/debug-isolated-process: []
                    android.*: built-projects
                    linux1804-64-qr/debug: ['mozilla-central']
                    linux1804-64(-shippable|-asan)?-qr/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-2009-shippable-qr/opt: built-projects
                    windows11-64-2009-qr/opt: ['autoland']
                    windows11-64-2009-qr/debug: ['autoland']
                    default: []
            media-gpu:
                by-test-platform:
                    windows11.*hw-ref.*: ['autoland', 'mozilla-central', 'mozilla-beta']
                    (macosx.*64)(-shippable)?-qr/(opt|debug): ['autoland', 'mozilla-central', 'mozilla-beta']
                    default: []
                    # TODO : add Android, it hasn't supported 'tags'
                    # TODO : add Linux, it would crash on gfxFeature.cpp:180
            default:
                by-test-platform:
                    .*hw-ref.*: []
                    android-hw.*/opt: []
                    android-em-7.0-x86_64-qr/debug-isolated-process: []
                    android.*: built-projects
                    linux.*(asan|ccov)/opt: []
                    .*(ccov/|asan/|-32).*: built-projects
                    (android|linux|windows10-64-2009|windows11-64-2009|macos)(?!.*-qr).*: []
                    default: built-projects
    loopback-video: true
    chunks:
        by-variant:
            wmf-media-engine: 1
            media-gpu: 1
            default:
                by-test-platform:
                    (android|macos).*/opt: 1
                    ^(?!.*asan).*windows1.*/opt: 1
                    linux.*/debug: 3
                    linux.*64-tsan-qr/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-7.*:
                    - --setpref=webgl.out-of-process=false
                    - --setpref=security.sandbox.content.headless=false
                    - --setpref=gfx.canvas.accelerated=false
                default:
                    - --setpref=webgl.out-of-process=false
                    - --setpref=security.sandbox.content.headless=false
    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.*: 1
                    android-em-7.0-x86_64-qr/debug-isolated-process: 3
                    android-hw.*: 1
                    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:
        by-test-platform:
            macosx.*64-ccov.*/.*: 7200
            default: 1800
    variants:
        - no-fission
        - webgl-ipc
        - webrender-sw+no-fission
        - webrender-sw
    run-on-projects:
        by-variant:
            webgl-ipc:
                by-test-platform:
                    .*-(ccov|tsan|wayland).*: []
                    linux.*-64.*: ["trunk"]
                    mac.*: ["trunk"]
                    win.*: ["trunk"]
                    default: []
            webrender-sw+no-fission:
                by-test-platform:
                    linux.*64-qr/debug: ['trunk']
                    default: []
            webrender-sw:
                by-test-platform:
                    linux.*64-qr/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']
                    linux1804-64-qr/debug: ['trunk']
                    linux1804-64(-shippable|-asan)?-qr/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
        extra-options:
            - --setpref=webgl.out-of-process=false
            - --setpref=security.sandbox.content.headless=false

mochitest-webgl1-ext:
    description: "Mochitest webgl1-ext run"
    treeherder-symbol: M(gl1e)
    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: 2700
    variants:
        - no-fission
        - webgl-ipc
        - webrender-sw+no-fission
        - webrender-sw
    run-on-projects:
        by-variant:
            webgl-ipc:
                by-test-platform:
                    .*-(ccov|tsan|wayland).*/.*: []
                    linux.*-64.*: ["trunk"]
                    mac.*: ["trunk"]
                    win.*: ["trunk"]
                    default: []
            webrender-sw+no-fission:
                by-test-platform:
                    linux.*64-qr/debug: ['trunk']
                    default: []
            webrender-sw:
                by-test-platform:
                    linux.*64-qr/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']
                    linux1804-64-qr/debug: ['trunk']
                    linux1804-64(-shippable|-asan)?-qr/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
        chunked: true
        extra-options:
            - --setpref=webgl.out-of-process=false
            - --setpref=security.sandbox.content.headless=false

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
        - webgl-ipc
        - webrender-sw+no-fission
        - webrender-sw
    run-on-projects:
        by-variant:
            webgl-ipc:
                by-test-platform:
                    .*-(ccov|tsan|wayland).*/.*: []
                    android.*: []
                    linux.*-64.*: ["trunk"]
                    mac.*: ["trunk"]
                    win.*: ["trunk"]
                    default: []
            webrender-sw+no-fission:
                by-test-platform:
                    linux.*64-qr/debug: ['trunk']
                    default: []
            webrender-sw:
                by-test-platform:
                    linux.*64-qr/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']
                    linux1804-64-qr/debug: ['trunk']
                    linux1804-64(-shippable|-asan)?-qr/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
        - webgl-ipc
        - webrender-sw+no-fission
        - webrender-sw
    run-on-projects:
        by-variant:
            webgl-ipc:
                by-test-platform:
                    .*(ccov|tsan|wayland).*/.*: []
                    linux.*-64.*: ["trunk"]
                    mac.*: ["trunk"]
                    win.*: ["trunk"]
                    default: []
            webrender-sw+no-fission:
                by-test-platform:
                    linux.*64-qr/debug: ["trunk"]
                    default: []
            webrender-sw:
                by-test-platform:
                    linux.*64-qr/debug: built-projects
                    default: []
            no-fission:
                by-test-platform:
                    linux1804-64-qr/debug: ['trunk']
                    linux1804-64(-shippable|-asan)?-qr/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
        extra-options:
            - --setpref=webgl.out-of-process=false
            - --setpref=security.sandbox.content.headless=false

mochitest-webgl2-deqp:
    description: "Mochitest webgl2-deqp run"
    treeherder-symbol: M(gl2d)
    schedules-component: mochitest-plain
    virtualization: virtual-with-gpu
    variants:
        - webgl-ipc
        - 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
        extra-options:
            - --setpref=webgl.out-of-process=false
            - --setpref=security.sandbox.content.headless=false

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-7.0-x86_64-qr/debug: ["trunk"]
                    default: []
            no-fission:
                by-test-platform:
                    linux2204-64-qr/debug: ['trunk']
                    linux2204-64(-shippable|-asan)?-qr/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:
        by-test-platform:
            macosx.*64-ccov.*/.*: 7200
            default: 1800
    mozharness:
        mochitest-flavor: plain
        extra-options:
            by-test-platform:
                macos.*:
                    - --setpref=gfx.webgpu.ignore-blocklist=true
                default: []

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.*: []
                    linux.*64.*(-shippable)?-qr/debug: ['autoland', 'mozilla-central']
                    default: []
            no-fission:
                by-test-platform:
                    linux1804-64-qr/debug: ['trunk']
                    linux1804-64(-shippable|-asan)?-qr/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(-qr)?/opt: xlarge-noscratch  # runs out of memory otherwise using 8GB
            default: default
