Bug 1346333 - Ensure all TC mochitests get correct 'test-type' tag r?dustin draft
authorWilliam Lachance <wlachance@mozilla.com>
Fri, 10 Mar 2017 13:55:55 -0500
changeset 496868 7c0f3744aa04a3ea538c3a1e234f5a759a877a03
parent 496768 a8d497b09753c91783b68c5805c64f34a2f39629
child 548726 8f508ddf1922215eb62b9393140e088d1f7ca924
push id48719
push userwlachance@mozilla.com
push dateFri, 10 Mar 2017 20:01:43 +0000
reviewersdustin
bugs1346333
milestone55.0a1
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
taskcluster/taskgraph/transforms/tests.py
--- 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'])