Bug 1580778 - Migrate raptor tests to taskgraph (#5361)
parent
e1b84a7a08
commit
4462899763
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
loader: taskgraph.loader.transform:loader
|
||||||
|
transforms:
|
||||||
|
- taskgraph.transforms.index_search:transforms
|
||||||
|
- taskgraph.transforms.task:transforms
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nightly:
|
||||||
|
description: "upstream nightly job"
|
||||||
|
index-search:
|
||||||
|
- gecko.v2.mozilla-central.nightly.latest.mobile.android-x86_64-opt
|
@ -0,0 +1,207 @@
|
|||||||
|
---
|
||||||
|
loader: taskgraph.loader.transform:loader
|
||||||
|
transforms:
|
||||||
|
- fenix_taskgraph.raptor:transforms
|
||||||
|
- taskgraph.transforms.job:transforms
|
||||||
|
- taskgraph.transforms.task:transforms
|
||||||
|
|
||||||
|
kind-dependencies:
|
||||||
|
- old-decision
|
||||||
|
only-for-build-types:
|
||||||
|
- raptor
|
||||||
|
only-for-abis:
|
||||||
|
- armeabi-v7a
|
||||||
|
- arm64-v8a
|
||||||
|
|
||||||
|
job-defaults:
|
||||||
|
worker-type:
|
||||||
|
by-abi:
|
||||||
|
armeabi-v7a: t-bitbar-gw-perf-g5
|
||||||
|
arm64-v8a: t-bitbar-gw-perf-p2
|
||||||
|
run-on-tasks-for: []
|
||||||
|
treeherder:
|
||||||
|
kind: test
|
||||||
|
tier: 2
|
||||||
|
platform:
|
||||||
|
by-abi:
|
||||||
|
arm64-v8a: android-hw-p2-8-0-android-aarch64/opt
|
||||||
|
armeabi-v7a: android-hw-g5-7-0-arm7-api-16/opt
|
||||||
|
dependencies:
|
||||||
|
geckoview-nightly: geckoview-nightly
|
||||||
|
signing: 'sign: forPerformanceTest' # comes from the old-decision task
|
||||||
|
worker:
|
||||||
|
max-run-time: 3600
|
||||||
|
env:
|
||||||
|
GECKO_HEAD_REPOSITORY: "https://hg.mozilla.org/mozilla-central"
|
||||||
|
MOZ_AUTOMATION: "1"
|
||||||
|
MOZ_HIDE_RESULTS_TABLE: "1"
|
||||||
|
MOZ_NO_REMOTE: "1"
|
||||||
|
MOZ_NODE_PATH: "/usr/local/bin/node"
|
||||||
|
MOZHARNESS_CONFIG: "raptor/android_hw_config.py"
|
||||||
|
MOZHARNESS_SCRIPT: "raptor_script.py"
|
||||||
|
NEED_XVFB: "false"
|
||||||
|
NO_FAIL_ON_TEST_ERRORS: "1"
|
||||||
|
XPCOM_DEBUG_BREAK: "warn"
|
||||||
|
artifacts:
|
||||||
|
- name: public/logs/
|
||||||
|
path: workspace/logs
|
||||||
|
type: directory
|
||||||
|
|
||||||
|
- name: public/test_info/
|
||||||
|
path: workspace/build/blobber_upload_dir
|
||||||
|
type: directory
|
||||||
|
|
||||||
|
|
||||||
|
run:
|
||||||
|
using: run-task
|
||||||
|
checkout: false
|
||||||
|
run-as-root: true
|
||||||
|
command:
|
||||||
|
- 'bash'
|
||||||
|
- './test-linux.sh'
|
||||||
|
- '--cfg=mozharness/configs/raptor/android_hw_config.py'
|
||||||
|
- '--app=fenix'
|
||||||
|
- '--binary=org.mozilla.fenix.performancetest'
|
||||||
|
- '--activity=org.mozilla.fenix.browser.BrowserPerformanceTestActivity'
|
||||||
|
- '--download-symbols=ondemand'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tp6m-cold-1:
|
||||||
|
test-name: raptor-tp6m-cold-1
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-1)'
|
||||||
|
|
||||||
|
tp6m-cold-2:
|
||||||
|
test-name: raptor-tp6m-cold-2
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-2)'
|
||||||
|
|
||||||
|
tp6m-cold-3:
|
||||||
|
test-name: raptor-tp6m-cold-3
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-3)'
|
||||||
|
|
||||||
|
tp6m-cold-4:
|
||||||
|
test-name: raptor-tp6m-cold-4
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-4)'
|
||||||
|
|
||||||
|
tp6m-cold-5:
|
||||||
|
test-name: raptor-tp6m-cold-5
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-5)'
|
||||||
|
|
||||||
|
tp6m-cold-6:
|
||||||
|
test-name: raptor-tp6m-cold-6
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-6)'
|
||||||
|
|
||||||
|
tp6m-cold-7:
|
||||||
|
test-name: raptor-tp6m-cold-7
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-7)'
|
||||||
|
|
||||||
|
tp6m-cold-8:
|
||||||
|
test-name: raptor-tp6m-cold-8
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-8)'
|
||||||
|
|
||||||
|
tp6m-cold-9:
|
||||||
|
test-name: raptor-tp6m-cold-9
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-9)'
|
||||||
|
|
||||||
|
tp6m-cold-10:
|
||||||
|
test-name: raptor-tp6m-cold-10
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-10)'
|
||||||
|
|
||||||
|
tp6m-cold-11:
|
||||||
|
test-name: raptor-tp6m-cold-11
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-11)'
|
||||||
|
|
||||||
|
tp6m-cold-12:
|
||||||
|
test-name: raptor-tp6m-cold-12
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-12)'
|
||||||
|
|
||||||
|
tp6m-cold-13:
|
||||||
|
test-name: raptor-tp6m-cold-13
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-13)'
|
||||||
|
|
||||||
|
tp6m-cold-14:
|
||||||
|
test-name: raptor-tp6m-cold-14
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-14)'
|
||||||
|
|
||||||
|
tp6m-cold-15:
|
||||||
|
test-name: raptor-tp6m-cold-15
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-15)'
|
||||||
|
|
||||||
|
tp6m-cold-16:
|
||||||
|
test-name: raptor-tp6m-cold-16
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-16)'
|
||||||
|
|
||||||
|
tp6m-cold-17:
|
||||||
|
test-name: raptor-tp6m-cold-17
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-17)'
|
||||||
|
|
||||||
|
tp6m-cold-18:
|
||||||
|
test-name: raptor-tp6m-cold-18
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-18)'
|
||||||
|
|
||||||
|
tp6m-cold-19:
|
||||||
|
test-name: raptor-tp6m-cold-19
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-19)'
|
||||||
|
|
||||||
|
tp6m-cold-20:
|
||||||
|
test-name: raptor-tp6m-cold-20
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-20)'
|
||||||
|
|
||||||
|
tp6m-cold-21:
|
||||||
|
test-name: raptor-tp6m-cold-21
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-21)'
|
||||||
|
|
||||||
|
tp6m-cold-22:
|
||||||
|
test-name: raptor-tp6m-cold-22
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-22)'
|
||||||
|
|
||||||
|
tp6m-cold-23:
|
||||||
|
test-name: raptor-tp6m-cold-23
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-23)'
|
||||||
|
|
||||||
|
tp6m-cold-24:
|
||||||
|
test-name: raptor-tp6m-cold-24
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-24)'
|
||||||
|
|
||||||
|
tp6m-cold-25:
|
||||||
|
test-name: raptor-tp6m-cold-25
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-25)'
|
||||||
|
|
||||||
|
tp6m-cold-26:
|
||||||
|
test-name: raptor-tp6m-cold-26
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-26)'
|
||||||
|
|
||||||
|
tp6m-cold-27:
|
||||||
|
test-name: raptor-tp6m-cold-27
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(tp6m-c-27)'
|
||||||
|
|
||||||
|
youtube-playback:
|
||||||
|
test-name: raptor-youtube-playback
|
||||||
|
treeherder:
|
||||||
|
symbol: 'Rap(ytp)'
|
@ -0,0 +1,96 @@
|
|||||||
|
# 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/.
|
||||||
|
"""
|
||||||
|
Apply some defaults and minor modifications to the jobs defined in the build
|
||||||
|
kind.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
|
import copy
|
||||||
|
import json
|
||||||
|
|
||||||
|
from taskgraph.transforms.base import TransformSequence
|
||||||
|
from taskgraph.util.treeherder import inherit_treeherder_from_dep
|
||||||
|
from taskgraph.util.schema import resolve_keyed_by
|
||||||
|
|
||||||
|
transforms = TransformSequence()
|
||||||
|
|
||||||
|
|
||||||
|
@transforms.add
|
||||||
|
def add_variants(config, tasks):
|
||||||
|
only_types = config.config["only-for-build-types"]
|
||||||
|
only_abis = config.config["only-for-abis"]
|
||||||
|
|
||||||
|
tests = list(tasks)
|
||||||
|
|
||||||
|
for dep_task in config.kind_dependencies_tasks:
|
||||||
|
build_type = dep_task.attributes.get("build-type", '')
|
||||||
|
if build_type not in only_types:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# TODO remove this if statement once signing tasks are fully created in taskgraph
|
||||||
|
if not dep_task.label.startswith('sign: '):
|
||||||
|
continue
|
||||||
|
|
||||||
|
for abi, apk_path in dep_task.attributes["apks"].items():
|
||||||
|
if abi not in only_abis:
|
||||||
|
continue
|
||||||
|
for test in tests:
|
||||||
|
test = copy.deepcopy(test)
|
||||||
|
attributes = copy.deepcopy(dep_task.attributes)
|
||||||
|
attributes.update(test.get("attributes", {}))
|
||||||
|
attributes["abi"] = abi
|
||||||
|
attributes["apk"] = apk_path
|
||||||
|
test["attributes"] = attributes
|
||||||
|
test["primary-dependency"] = dep_task
|
||||||
|
yield test
|
||||||
|
|
||||||
|
|
||||||
|
@transforms.add
|
||||||
|
def build_raptor_task(config, tasks):
|
||||||
|
for task in tasks:
|
||||||
|
signing = task.pop("primary-dependency")
|
||||||
|
build_type = task["attributes"]["build-type"]
|
||||||
|
abi = task["attributes"]["abi"]
|
||||||
|
apk = task["attributes"]["apk"]
|
||||||
|
|
||||||
|
test_name = task.pop("test-name")
|
||||||
|
|
||||||
|
task["name"] = "{}-{}-{}".format(task["name"], build_type, abi)
|
||||||
|
task["description"] = "{}-{}".format(build_type, abi)
|
||||||
|
|
||||||
|
for key in ("worker-type", "treeherder.platform"):
|
||||||
|
resolve_keyed_by(task, key, item_name=task["name"], **{"abi": abi})
|
||||||
|
|
||||||
|
task["treeherder"] = inherit_treeherder_from_dep(task, signing)
|
||||||
|
|
||||||
|
extra_config = {
|
||||||
|
"installer_url": "<signing/{}>".format(apk),
|
||||||
|
"test_packages_url": "<geckoview-nightly/public/build/en-US/target.test_packages.json>",
|
||||||
|
}
|
||||||
|
env = task["worker"]["env"]
|
||||||
|
env["EXTRA_MOZHARNESS_CONFIG"] = {
|
||||||
|
"artifact-reference": json.dumps(extra_config, sort_keys=True)
|
||||||
|
}
|
||||||
|
env["GECKO_HEAD_REV"] = "default"
|
||||||
|
env["MOZILLA_BUILD_URL"] = {"artifact-reference": "<signing/{}>".format(apk)}
|
||||||
|
env["MOZHARNESS_URL"] = {
|
||||||
|
"artifact-reference": "<geckoview-nightly/public/build/en-US/mozharness.zip>"
|
||||||
|
}
|
||||||
|
env["TASKCLUSTER_WORKER_TYPE"] = task["worker-type"]
|
||||||
|
|
||||||
|
worker = task["worker"]
|
||||||
|
worker.setdefault("mounts", []).append(
|
||||||
|
{
|
||||||
|
"content": {
|
||||||
|
"url": "https://hg.mozilla.org/mozilla-central/raw-file/default/taskcluster/scripts/tester/test-linux.sh"
|
||||||
|
},
|
||||||
|
"file": "./test-linux.sh",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
task["run"]["command"].append("--test={}".format(test_name))
|
||||||
|
task["run"]["command"].extend(task.pop("args", []))
|
||||||
|
|
||||||
|
yield task
|
Loading…
Reference in New Issue