# 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:
    mozharness:
        script: marionette.py
        config:
            by-test-platform:
                macosx.*:
                    - marionette/prod_config.py
                    - marionette/mac_taskcluster_config.py
                windows.*:
                    - marionette/windows_taskcluster_config.py
                default:
                    - marionette/prod_config.py
                    - remove_executables.py
    virtualization: virtual

marionette-unittest:
    description: "Marionette unittest run"
    treeherder-symbol: Mn(unit)
    variants:
        - webrender-sw
        - headless
    run-on-projects:
        by-variant:
            headless:
                by-test-platform:
                    linux.*64(-shippable)?(-qr)?/opt: built-projects
                    default: []
            webrender-sw:
                by-test-platform:
                    .*-wayland.*: []
                    .*/debug: built-projects
                    default: []
            default:
                by-test-platform:
                    .*-wayland.*: []
                    default: built-projects
    tier:
        by-variant:
            headless: 2
            default: default
    max-run-time:
        by-test-platform:
            .*-asan.*: 3600
            .*-tsan.*: 4500
            default: 1800
    instance-size: default
    chunks: 1
    suite: marionette-unittest
    test-manifest-loader: null  # don't load in taskgraph
    mozharness:
        extra-options:
            - --subsuite=unittest
            - --test-manifest=unit/unit-tests.toml

marionette-integration:
    description: "Marionette integration run"
    treeherder-symbol: Mn()
    suite: marionette-integration
    variants:
        - webrender-sw
        - headless
        - inc-origin-init
    run-on-projects:
        by-variant:
            headless:
                by-test-platform:
                    linux.*64(-shippable)?(-qr)?/opt: built-projects
                    default: []
            webrender-sw:
                by-test-platform:
                    .*-wayland.*: []
                    .*/debug: built-projects
                    default: []
            inc-origin-init: []
            default:
                by-test-platform:
                    .*-wayland.*: []
                    default: built-projects
    tier:
        by-variant:
            headless: 2
            default: default
    max-run-time:
        by-test-platform:
            .*-asan.*: 3600
            .*-tsan.*: 3600
            .*-ccov.*: 3600
            .*-debug.*: 3600
            default: 2700
    instance-size: default
    chunks:
        by-variant:
            inc-origin-init: dynamic
            default:
                by-test-platform:
                    .*-asan.*: 2
                    .*-tsan.*: 2
                    default: 1
