2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-07 15:20:38 +00:00
iceraven-browser/taskcluster/fenix_taskgraph/target_tasks.py
Gregory Mierzwinski a02c283a0e [fenix] Bug 1613483 - Add all Browsertime tests with visual metrics to Fenix repo. (https://github.com/mozilla-mobile/fenix/pull/9087)
* Add visual-metrics docker type.

* Add required browsertime toolchain fetches.

* Add browsertime tests for technical and visual metrics.

* Run browsertime tests in a cron task.

* Run visual metrics on all browsertime tests.

* Use spaces instead of tabs, and resolve visual-metric nits.

* Enable browsertime on pull request for testing.

* Restrict PR tests to amazon on browsertime.

* First attempt using multi_dep.

* Add a primary dependency to browsertime.

* Try by not popping.

* Debug prints.

* Make one grouping per browsertime task.

* Try without the multi_dep transform.

* Delete dependent-tasks in visual-metrics transformer.

* Update setuptools installed and copy run-on-tasks-for.

* Use get when getting run-on-tasks-for.

* Add new pinned requirements.

* Try it.

* Set run-on-tasks-for properly.

* Remove print statement.

* Remove single_dep loader, and print statements.

* Remove run-on-tasks-for testing setting.

* Restart testing, and set user to root in visual-metrics Docker.

* Remove testing settings.

* Remove fetch-content from Docker.

* Change attributes grouping method.

* Run all tests as a check.

* Undo testing changes, and fix a bad test name.
2020-03-17 18:21:41 +01:00

62 lines
2.2 KiB
Python

# 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/.
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.target_tasks import _target_task, filter_for_tasks_for
@_target_task('default')
def target_tasks_default(full_task_graph, parameters, graph_config):
"""Target the tasks which have indicated they should be run on this project
via the `run_on_projects` attributes."""
filter = filter_for_tasks_for
return [l for l, t in full_task_graph.tasks.iteritems() if filter_for_tasks_for(t, parameters)]
@_target_task('release')
def target_tasks_default(full_task_graph, parameters, graph_config):
def filter(task, parameters):
return task.attributes.get("release-type", "") == parameters["release_type"]
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
@_target_task("nightly")
def target_tasks_nightly(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build."""
def filter(task, parameters):
return task.attributes.get("nightly", False)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
def _filter_fennec(fennec_type, task, parameters):
return task.attributes.get("build-type", "") == "fennec-{}".format(fennec_type)
@_target_task("fennec-beta")
def target_tasks_fennec_nightly(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a beta build signed with the fennec key."""
return [l for l, t in full_task_graph.tasks.iteritems() if _filter_fennec("beta", t, parameters)]
@_target_task('raptor')
def target_tasks_raptor(full_task_graph, parameters, graph_config):
def filter(task, parameters):
return task.kind == 'raptor'
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
@_target_task('browsertime')
def target_tasks_raptor(full_task_graph, parameters, graph_config):
def filter(task, parameters):
return task.kind == 'browsertime'
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]