зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1700774 - [taskgraph] Move test transforms to a 'transforms/test' directory, r=gbrown
This includes: transforms/tests.py -> transforms/test/__init__.py transforms/raptor.py -> transforms/test/raptor.py This is a pre-cursor to splitting the file up into multiple smaller files under the new 'test' transform directory. Differential Revision: https://phabricator.services.mozilla.com/D132068
This commit is contained in:
Родитель
f95bb0c556
Коммит
89cabb3dc5
|
@ -12,14 +12,14 @@ kind-dependencies:
|
|||
- toolchain
|
||||
|
||||
transforms:
|
||||
- gecko_taskgraph.transforms.tests:transforms
|
||||
- gecko_taskgraph.transforms.test:transforms
|
||||
- gecko_taskgraph.transforms.job:transforms
|
||||
- gecko_taskgraph.transforms.task:transforms
|
||||
|
||||
# Each stanza in a file pointed to by 'jobs-from' describes a particular test
|
||||
# suite or sub-suite. These are processed through the transformations described
|
||||
# above to produce a bunch of tasks. See the schema in
|
||||
# `taskcluster/gecko_taskgraph/transforms/tests.py` for a description of the fields
|
||||
# `taskcluster/gecko_taskgraph/transforms/test/__init__.py` for a description of the fields
|
||||
# used in these files.
|
||||
|
||||
# Adding a new test type or running tests on a new platform? Be sure to review
|
||||
|
|
|
@ -144,7 +144,7 @@ unittest_variant
|
|||
|
||||
The configuration variant the test suite is running with. If set, this usually
|
||||
means the tests are running with a special pref enabled. These are defined in
|
||||
``taskgraph.transforms.tests.TEST_VARIANTS``.
|
||||
``taskgraph.transforms.test.TEST_VARIANTS``.
|
||||
|
||||
talos_try_name
|
||||
==============
|
||||
|
|
|
@ -86,7 +86,7 @@ platform. For example:
|
|||
default: 8
|
||||
|
||||
The full set of available properties is in
|
||||
``taskcluster/gecko_taskgraph/transforms/tests.py``. Some other
|
||||
``taskcluster/gecko_taskgraph/transforms/test/__init__.py``. Some other
|
||||
commonly-modified properties are ``max-run-time`` (useful if tests are being
|
||||
killed for exceeding maxRunTime) and ``treeherder-symbol``.
|
||||
|
||||
|
@ -104,7 +104,7 @@ for that suite, and which kind it fits into (consult :doc:`kinds`).
|
|||
Add a new stanza to ``taskcluster/ci/<kind>/tests.yml``, copying from the other
|
||||
stanzas in that file. The meanings should be clear, but authoritative
|
||||
documentation is in
|
||||
``taskcluster/gecko_taskgraph/transforms/tests.py`` should you need
|
||||
``taskcluster/gecko_taskgraph/transforms/test/__init__.py`` should you need
|
||||
it. The stanza name is the name by which the test will be referenced in try
|
||||
syntax.
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ See this file for an up to date list of active variants and the pref(s) they
|
|||
set.
|
||||
|
||||
Each variant must conform to the
|
||||
:py:data:`~gecko_taskgraph.transforms.tests.variant_description_schema`:
|
||||
:py:data:`~gecko_taskgraph.transforms.test.variant_description_schema`:
|
||||
|
||||
* **description** (required) - A description explaining what the variant is for
|
||||
* **suffix** (required) - A suffix to apply to the task label and treeherder symbol
|
||||
|
@ -123,11 +123,11 @@ that make up a ``setting``:
|
|||
|
||||
Test ``settings`` are available in the ``task.extra.test-setting`` object in
|
||||
all test tasks. They are defined by the
|
||||
:py:func:`~gecko_taskgraph.transforms.tests.set_test_setting` transform
|
||||
:py:func:`~gecko_taskgraph.transforms.test.set_test_setting` transform
|
||||
function.
|
||||
|
||||
The full schema is defined in the
|
||||
:py:data:`~gecko_taskgraph.transforms.tests.test_setting_description_schema`.
|
||||
:py:data:`~gecko_taskgraph.transforms.test.test_setting_description_schema`.
|
||||
|
||||
Setting Hash
|
||||
~~~~~~~~~~~~
|
||||
|
|
|
@ -106,8 +106,9 @@ invocation on different platforms leaves a lot of specific behavior in the test
|
|||
description, divided by ``by-test-platform``.
|
||||
|
||||
Test descriptions are validated to conform to the schema in
|
||||
``taskcluster/gecko_taskgraph/transforms/tests.py``. This schema is extensively
|
||||
documented and is a the primary reference for anyone modifying tests.
|
||||
``taskcluster/gecko_taskgraph/transforms/test/__init__.py``. This schema is
|
||||
extensively documented and is a the primary reference for anyone modifying
|
||||
tests.
|
||||
|
||||
The output of ``tests.py`` is a task description. Test dependencies are
|
||||
produced in the form of a dictionary mapping dependency name to task label.
|
||||
|
|
|
@ -17,7 +17,7 @@ subsuite = taskgraph
|
|||
[test_taskcluster_yml.py]
|
||||
[test_transforms_base.py]
|
||||
[test_transforms_job.py]
|
||||
[test_transforms_tests.py]
|
||||
[test_transforms_test.py]
|
||||
[test_try_option_syntax.py]
|
||||
[test_util_attributes.py]
|
||||
[test_util_backstop.py]
|
||||
|
|
|
@ -11,7 +11,7 @@ from functools import partial
|
|||
import mozunit
|
||||
import pytest
|
||||
|
||||
from gecko_taskgraph.transforms import tests as test_transforms
|
||||
from gecko_taskgraph.transforms import test as test_transforms
|
||||
|
||||
|
||||
@pytest.fixture
|
|
@ -16,7 +16,7 @@ from gecko_taskgraph.transforms.job import (
|
|||
)
|
||||
from gecko_taskgraph.util.schema import Schema
|
||||
from gecko_taskgraph.util.taskcluster import get_artifact_path
|
||||
from gecko_taskgraph.transforms.tests import test_description_schema, normpath
|
||||
from gecko_taskgraph.transforms.test import test_description_schema, normpath
|
||||
from gecko_taskgraph.transforms.job.common import support_vcs_checkout
|
||||
|
||||
VARIANTS = [
|
||||
|
|
|
@ -654,7 +654,7 @@ def resolve_keys(config, tasks):
|
|||
@transforms.add
|
||||
def setup_raptor(config, tasks):
|
||||
"""Add options that are specific to raptor jobs (identified by suite=raptor)"""
|
||||
from gecko_taskgraph.transforms.raptor import transforms as raptor_transforms
|
||||
from gecko_taskgraph.transforms.test.raptor import transforms as raptor_transforms
|
||||
|
||||
for task in tasks:
|
||||
if task["suite"] != "raptor":
|
|
@ -12,7 +12,7 @@ from voluptuous import (
|
|||
)
|
||||
|
||||
from gecko_taskgraph.transforms.base import TransformSequence
|
||||
from gecko_taskgraph.transforms.tests import test_description_schema
|
||||
from gecko_taskgraph.transforms.test import test_description_schema
|
||||
from gecko_taskgraph.util.schema import optionally_keyed_by, resolve_keyed_by, Schema
|
||||
from gecko_taskgraph.util.treeherder import split_symbol, join_symbol
|
||||
|
|
@ -153,7 +153,7 @@ format for analysis. Anytime a code coverage run generates \*.gcda and
|
|||
permanently fail when it is running on a build that is instrumented with
|
||||
GCOV. To debug these issues without overloading ActiveData with garbage
|
||||
coverage data, open the file
|
||||
`taskcluster/gecko_taskgraph/transforms/tests.py <https://searchfox.org/mozilla-central/source/taskcluster/gecko_taskgraph/transforms/tests.py#516>`__
|
||||
`taskcluster/gecko_taskgraph/transforms/test/__init__.py <https://searchfox.org/mozilla-central/source/taskcluster/gecko_taskgraph/transforms/test/__init__.py#516>`__
|
||||
and add the following line,
|
||||
|
||||
.. code:: python
|
||||
|
|
|
@ -308,7 +308,7 @@ avoid-blacklist-and-whitelist:
|
|||
- taskcluster/ci/docker-image/kind.yml
|
||||
- taskcluster/gecko_taskgraph/actions/create_interactive.py
|
||||
- taskcluster/gecko_taskgraph/target_tasks.py
|
||||
- taskcluster/gecko_taskgraph/transforms/tests.py
|
||||
- taskcluster/gecko_taskgraph/transforms/test/__init__.py
|
||||
- taskcluster/gecko_taskgraph/try_option_syntax.py
|
||||
- taskcluster/gecko_taskgraph/util/schema.py
|
||||
- taskcluster/test/test_mach_try_auto.py
|
||||
|
|
Загрузка…
Ссылка в новой задаче