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 345357 52a406607871
parent 345356 665c50232125
child 345358 f3b989e0a7b9
push id31436
push userkwierso@gmail.com
push dateThu, 02 Mar 2017 01:18:52 +0000
treeherdermozilla-central@e91de6fb2b3d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1342963
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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'] = {