Bug 1345980 - Mark up all taskcluster mochitest jobs with tag 'test-type: mochitest' r?dustin draft
authorWilliam Lachance <wlachance@mozilla.com>
Thu, 09 Mar 2017 14:41:14 -0500
changeset 496161 5cfa18355d5fb25965c78853ddeb5c1dcaa7dec1
parent 495950 34585620e529614c79ecc007705646de748e592d
child 548559 102db5b92e6cf911d19092bd8da7a5c5b0cf512d
push id48539
push userwlachance@mozilla.com
push dateThu, 09 Mar 2017 21:41:46 +0000
reviewersdustin
bugs1345980
milestone55.0a1
Bug 1345980 - Mark up all taskcluster mochitest jobs with tag 'test-type: mochitest' r?dustin Necessary for treeherder action retriggering code to recognize them as supporting this action. MozReview-Commit-ID: BY6OCUFsYlK
taskcluster/ci/test/tests.yml
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -378,18 +378,16 @@ marionette:
 
 mochitest:
     description: "Mochitest plain run"
     suite:
         by-test-platform:
             linux64-jsdcov/opt: mochitest/plain-chunked-coverage
             default: mochitest/plain-chunked
     treeherder-symbol: tc-M()
-    tags:
-        test-type: mochitest
     loopback-video: true
     instance-size:
         by-test-platform:
             linux64-jsdcov/opt: xlarge
             android.*: xlarge
             default: legacy # Bug 1281241: migrating to m3.large instances
     chunks:
         by-test-platform:
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -362,16 +362,24 @@ 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"}