Bug 1346333 - Ensure all TC mochitests get correct 'test-type' tag r?dustin
The previous attempt at this didn't handle jobs that were keyed by platform,
which was most of them.
MozReview-Commit-ID: IC602td532T
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -365,24 +365,16 @@ def set_treeherder_machine_platform(conf
}
for test in tests:
test['treeherder-machine-platform'] = translation.get(
test['build-platform'], test['test-platform'])
yield test
@transforms.add
-def set_mochitest_test_type(config, tests):
- for test in tests:
- if type(test['suite']) == str and test['suite'].startswith('mochitest'):
- test.setdefault('tags', {})['test-type'] = 'mochitest'
- yield test
-
-
-@transforms.add
def set_asan_docker_image(config, tests):
"""Set the appropriate task.extra.treeherder.docker-image"""
# Linux64-asan has many leaks with running mochitest-media jobs
# on Ubuntu 16.04, please remove this when bug 1289209 is resolved
for test in tests:
if test['suite'] == 'mochitest/mochitest-media' and \
test['build-platform'] == 'linux64-asan/opt':
test['docker-image'] = {"in-tree": "desktop-test"}
@@ -603,16 +595,24 @@ def remove_linux_pgo_try_talos(config, t
and test['suite'] == 'talos'
and config.params['project'] == 'try'
)
for test in filter(predicate, tests):
yield test
@transforms.add
+def set_mochitest_test_type(config, tests):
+ for test in tests:
+ if 'mochitest' in test['suite']:
+ test.setdefault('tags', {})['test-type'] = 'mochitest'
+ yield test
+
+
+@transforms.add
def make_job_description(config, tests):
"""Convert *test* descriptions to *job* descriptions (input to
taskgraph.transforms.job)"""
for test in tests:
label = '{}-{}-{}'.format(config.kind, test['test-platform'], test['test-name'])
if test['chunks'] > 1:
label += '-{}'.format(test['this-chunk'])