Bug 1388478 - Load tests.yml tasks with the transform loader, r=dustin

This will allow us to use 'jobs', 'jobs-from' and 'job-defaults' with the test
kind.

MozReview-Commit-ID: 7q66kjSI4b3

--HG--
extra : rebase_source : 46c46b1a02d74a1e953c878de2fbb6cbb1b5dd81
This commit is contained in:
Andrew Halberstadt 2017-10-17 15:57:14 -04:00
parent d8ac050c91
commit 790bf29f2d
3 changed files with 9 additions and 1 deletions

View File

@ -9,3 +9,6 @@ transforms:
- taskgraph.transforms.job:transforms
- taskgraph.transforms.coalesce:transforms
- taskgraph.transforms.task:transforms
jobs-from:
- tests.yml

View File

@ -7,6 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals
import copy
import logging
from .transform import loader as transform_loader
from ..util.yaml import load_yaml
logger = logging.getLogger(__name__)
@ -39,7 +40,8 @@ def loader(kind, path, config, params, loaded_tasks):
test_platforms = expand_tests(test_sets_cfg, test_platforms)
# load the test descriptions
test_descriptions = load_yaml(path, 'tests.yml', enforce_order=True)
tests = transform_loader(kind, path, config, params, loaded_tasks)
test_descriptions = {t.pop('name'): t for t in tests}
# generate all tests for all test platforms
for test_platform_name, test_platform in test_platforms.iteritems():

View File

@ -168,6 +168,9 @@ test_description_schema = Schema({
# common attributes)
Optional('attributes'): {basestring: object},
# relative path (from config.path) to the file task was defined in
Optional('job-from'): basestring,
# The `run_on_projects` attribute, defaulting to "all". This dictates the
# projects on which this task should be included in the target task set.
# See the attributes documentation for details.