Bug 1342963 - only run jsreftests when js/src/* changes. r=dustin
authorJoel Maher <jmaher@mozilla.com>
Wed, 01 Mar 2017 14:36:45 -0500
changeset 374384 52a406607871931b102f6dc76ce5eaff75cd8914
parent 374383 665c5023212598462d33d7addc1e14d7c7c10ee3
child 374385 f3b989e0a7b90950c47dd72425c7f669f027c685
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1342963
milestone54.0a1
Bug 1342963 - only run jsreftests when js/src/* changes. r=dustin MozReview-Commit-ID: 2stKqaayBHY
taskcluster/ci/test/tests.yml
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -313,16 +313,20 @@ jsreftest:
                         macosx.*:
                             - remove_executables.py
                             - unittests/mac_unittest.py
                         linux.*:
                             - unittests/linux_unittest.py
                             - remove_executables.py
                 extra-options:
                     - --reftest-suite=jsreftest
+    when:
+        files-changed:
+            - js/src/**
+            - js/public/**
 
 marionette:
     description: "Marionette unittest run"
     suite: marionette
     treeherder-symbol: tc(Mn)
     max-run-time:
         by-test-platform:
             android.*: 3600
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -266,16 +266,21 @@ test_description_schema = Schema({
     # the platform on which the tests will run
     'test-platform': basestring,
 
     # the name of the test (the key in tests.yml)
     'test-name': basestring,
 
     # the product name, defaults to firefox
     Optional('product'): basestring,
+
+    # conditional files to determine when these tests should be run
+    Optional('when'): Any({
+        Optional('files-changed'): [basestring],
+    }),
 
 }, required=True)
 
 
 @transforms.add
 def validate(config, tests):
     for test in tests:
         yield validate_schema(test_description_schema, test,
@@ -628,16 +633,17 @@ def make_job_description(config, tests):
             attr_try_name: try_name,
         })
 
         jobdesc = {}
         name = '{}-{}'.format(test['test-platform'], test['test-name'])
         jobdesc['name'] = name
         jobdesc['label'] = label
         jobdesc['description'] = test['description']
+        jobdesc['when'] = test.get('when', {})
         jobdesc['attributes'] = attributes
         jobdesc['dependencies'] = {'build': build_label}
         jobdesc['expires-after'] = test['expires-after']
         jobdesc['routes'] = []
         jobdesc['run-on-projects'] = test.get('run-on-projects', ['all'])
         jobdesc['scopes'] = []
         jobdesc['tags'] = test.get('tags', {})
         jobdesc['extra'] = {