job-defaults:
    mozharness:
        no-read-buildbot-config: true
        script:
            by-test-platform:
                android.*: android_emulator_unittest.py
                default: desktop_unittest.py
        config:
            by-test-platform:
                android-4.2-x86/opt:
                    - android/android_common.py
                    - android/androidx86.py
                android.*:
                    - android/android_common.py
                    - android/androidarm_4_3.py
                linux.*:
                    - unittests/linux_unittest.py
                    - remove_executables.py
                macosx.*:
                    - unittests/mac_unittest.py
                windows.*:
                    - unittests/win_taskcluster_unittest.py

mochitest:
    description: "Mochitest plain run"
    suite:
        by-test-platform:
            linux64-jsdcov/opt: mochitest/plain-chunked-coverage
            default: mochitest/plain-chunked
    treeherder-symbol: M()
    loopback-video: true
    instance-size:
        by-test-platform:
            linux64-jsdcov/opt: xlarge
            android.*: xlarge
            default: default
    chunks:
        by-test-platform:
            android-4.3-arm7-api-16/debug: 48
            android.*: 24
            linux.*/debug: 16
            linux64-asan/opt: 10
            linux64-.*cov/opt: 10
            windows10-64-ccov/debug: 10
            default: 5
    e10s:
        by-test-platform:
            linux64-jsdcov/opt: false
            windows7-32/debug: both
            default: true
    max-run-time:
        by-test-platform:
            android-4.3-arm7-api-16/debug: 7200
            default: 5400
    allow-software-gl-layers: false
    tier:
        by-test-platform:
            windows10-64-asan.*: 3
            default: default
    mozharness:
        mochitest-flavor: plain
        extra-options:
            by-test-platform:
                android.*:
                    - --test-suite=mochitest
                default: []
        chunked:
            by-test-platform:
                android.*: false
                default: true

mochitest-a11y:
    description: "Mochitest a11y run"
    suite: mochitest/a11y
    treeherder-symbol: M(a11y)
    loopback-video: true
    e10s: false
    run-on-projects:
        by-test-platform:
            .*-qr/.*: ['mozilla-central', 'try']
            default: built-projects
    mozharness:
        mochitest-flavor: a11y
    tier:
        by-test-platform:
            windows10-64-asan.*: 3
            default: default

mochitest-browser-chrome:
    description: "Mochitest browser-chrome run"
    suite:
        by-test-platform:
            linux64-jsdcov/opt: mochitest/browser-chrome-coverage
            default: mochitest/browser-chrome-chunked
    treeherder-symbol: M(bc)
    loopback-video: true
    chunks:
        by-test-platform:
            linux.*/debug: 16
            linux64-asan/opt: 16
            default: 7
    e10s:
        by-test-platform:
            linux64-jsdcov/opt: false
            windows7-32/debug: both
            default: true
    max-run-time:
        by-test-platform:
            linux64-.*cov/opt: 7200
            windows10-64-ccov/debug: 7200
            linux.*/debug: 5400
            default: 3600
    mozharness:
        mochitest-flavor: browser
        chunked: true
    # Bug 1281241: migrating to m3.large instances
    instance-size:
        by-test-platform:
            linux64-jsdcov/opt: xlarge
            default: default
    allow-software-gl-layers: false
    tier:
        by-test-platform:
            windows10-64-asan.*: 3
            default: default

browser-instrumentation:
    description: "Extra instrumentation for a browser-chrome run (XUL, XBL, etc)"
    suite: mochitest/browser-chrome-instrumentation
    treeherder-symbol: M(inst)
    loopback-video: true
    tier: 3
    run-on-projects:
        by-test-platform:
            windows.*-nightly/.*: ["mozilla-central"]
            default: []
    max-run-time: 14400
    mozharness:
        mochitest-flavor: browser
    allow-software-gl-layers: false

browser-screenshots:
    description: "Browser Screenshots"
    suite: mochitest/browser-chrome-screenshots
    treeherder-symbol: M(ss)
    loopback-video: true
    run-on-projects:
        by-test-platform:
            # We don't want debug, pgo, devedition or nightly builds
            windows7-32/opt: ['mozilla-central', 'integration']
            windows10-64/opt: ['mozilla-central', 'integration']
            linux64/opt: ['mozilla-central', 'integration']
            macosx64/opt: ['mozilla-central', 'integration']
            default: []
    max-run-time: 3600
    mozharness:
        mochitest-flavor: browser
    allow-software-gl-layers: false

mochitest-chrome:
    description: "Mochitest chrome run"
    suite: mochitest/chrome
    treeherder-symbol: M(c)
    loopback-video: true
    instance-size:
        by-test-platform:
            android.*: xlarge
            default: default
    chunks:
        by-test-platform:
            android-4.3-arm7-api-16/debug: 4
            android.*: 2
            default: 3
    max-run-time: 3600
    e10s: false
    mozharness:
        mochitest-flavor: chrome
        config:
            by-test-platform:
                macosx.*:
                    - remove_executables.py
        extra-options:
            by-test-platform:
                android.*:
                    - --test-suite=mochitest-chrome
                default: []
        chunked:
            by-test-platform:
                android.*: false
                default: true
    tier:
        by-test-platform:
            windows10-64-asan.*: 3
            default: default

mochitest-clipboard:
    description: "Mochitest clipboard run"
    suite: mochitest/clipboard
    treeherder-symbol: M(cl)
    loopback-video: true
    instance-size: xlarge
    e10s:
        by-test-platform:
            windows7-32/debug: both
            default: true
    mozharness:
        mochitest-flavor: plain
        config:
            by-test-platform:
                macosx.*:
                    - remove_executables.py
        extra-options:
            by-test-platform:
                android.*:
                    # note that Android runs fewer suites than other platforms
                    - --test-suite=mochitest-plain-clipboard
                default:
                    - --mochitest-suite=plain-clipboard,chrome-clipboard,browser-chrome-clipboard
    tier:
        by-test-platform:
            windows10-64-asan.*: 3
            default: default

mochitest-devtools-chrome:
    description: "Mochitest devtools-chrome run"
    suite:
        by-test-platform:
            linux64-jsdcov/opt: mochitest/mochitest-devtools-chrome-coverage
            default: mochitest/mochitest-devtools-chrome-chunked
    treeherder-symbol: M(dt)
    loopback-video: true
    max-run-time: 5400
    chunks: 8
    e10s:
        by-test-platform:
            linux64-jsdcov/opt: false
            windows7-32/debug: both
            default: true
    mozharness:
        mochitest-flavor: chrome
        chunked: true
    instance-size:
        by-test-platform:
            linux64-asan/opt: xlarge  # runs out of memory on default/m3.large
            default: default
    # Bug 1296086: high number of intermittents observed with software GL and large instances
    allow-software-gl-layers: false
    tier:
        by-test-platform:
            windows10-64-asan.*: 3
            default: default

mochitest-gpu:
    description: "Mochitest GPU run"
    suite: mochitest/gpu
    treeherder-symbol: M(gpu)
    run-on-projects:
        by-test-platform:
            .*-qr/.*: ['mozilla-central', 'autoland', 'mozilla-inbound', 'try']  # exclude beta and project branches
            default: built-projects
    loopback-video: true
    instance-size:
        by-test-platform:
            android.*: xlarge
            default: default
    virtualization: virtual-with-gpu
    e10s:
        by-test-platform:
            windows7-32/debug: both
            default: true
    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=plain-gpu,chrome-gpu,browser-chrome-gpu
    tier:
        by-test-platform:
            linux64-qr/.*: 1
            windows10-64-asan.*: 3
            default: default

mochitest-media:
    description: "Mochitest media run"
    suite: mochitest/mochitest-media
    treeherder-symbol: M(mda)
    max-run-time: 5400
    run-on-projects:
        by-test-platform:
            .*-qr/.*: ['mozilla-central', 'autoland', 'mozilla-inbound', 'try']  # exclude beta and project branches
            default: built-projects
    loopback-video: true
    virtualization:
        by-test-platform:
            windows10-64-qr/.*: virtual-with-gpu
            default: virtual
    instance-size:
        by-test-platform:
            android.*: xlarge
            default: large
    chunks:
        by-test-platform:
            macosx64.*: 1
            windows10-64.*: 1
            default: 3
    mozharness:
        mochitest-flavor: plain
        chunked:
            by-test-platform:
                android.*: false
                macosx64.*: false
                windows10-64.*: false
                default: true
    tier:
        by-test-platform:
            linux64-qr/.*: 1
            windows10-64-asan.*: 3
            default: default

mochitest-plain-headless:
    description: "Mochitest plain headless run"
    suite: mochitest/plain-chunked
    treeherder-symbol: M(h)
    loopback-video: true
    chunks:
        by-test-platform:
            linux.*/debug: 16
            default: 5
    e10s: true
    max-run-time: 5400
    allow-software-gl-layers: false
    tier: default
    mozharness:
        mochitest-flavor: plain
        chunked: true
        extra-options:
            - --headless

mochitest-valgrind:
    description: "Mochitest plain Valgrind run"
    suite: mochitest/valgrind-plain
    treeherder-symbol: M-V()
    run-on-projects: []
    tier: 3
    loopback-video: true
    chunks: 40
    max-run-time: 14400
    # We could re-enable e10s later.
    # There's no intrinsic reason not to use it.
    e10s: false
    allow-software-gl-layers: false
    mozharness:
        mochitest-flavor: plain
        chunked: true

mochitest-webgl:
    description: "Mochitest webgl run"
    suite: mochitest/mochitest-gl
    treeherder-symbol: M(gl)
    run-on-projects:
        by-test-platform:
            windows10-64-ccov/.*: []  # Do not run on Windows ccov, see bug 1419475.
            default: built-projects
    virtualization: virtual-with-gpu
    chunks:
        by-test-platform:
            android.*: 10
            windows.*: 8
            default: 3
    e10s:
        by-test-platform:
            windows7-32/debug: both
            default: true
    loopback-video: true
    max-run-time:
        by-test-platform:
            windows.*: 5400
            android.*: 7200
            default: 3600
    instance-size:
        by-test-platform:
            android.*: xlarge
            default: default
    # Bug 1296733: llvmpipe with mesa 9.2.1 lacks thread safety
    allow-software-gl-layers: false
    mozharness:
        mochitest-flavor: plain
        chunked:
            by-test-platform:
                android.*: false
                default: true
    tier:
        by-test-platform:
            linux64-qr/.*: 1
            windows10-64-asan.*: 3
            default: default
