Backout removal of when.files-changed support for tests from
Bug 1403322; r?dustin
MozReview-Commit-ID: 1ZT1VWJx7Y
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -373,16 +373,21 @@ test_description_schema = Schema({
'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],
+ }),
+
Optional('worker-type'): optionally_keyed_by(
'test-platform',
Any(basestring, None),
),
}, required=True)
@@ -1006,17 +1011,19 @@ def make_job_description(config, tests):
if suite in INCLUSIVE_COMPONENTS:
# if this is an "inclusive" test, then all files which might
# cause it to run are annotated with SCHEDULES in moz.build,
# so do not include the platform or any other components here
schedules = [suite]
else:
schedules = [suite, platform_family(test['build-platform'])]
- if config.params['project'] != 'try':
+ if test.get('when'):
+ jobdesc['when'] = test['when']
+ elif config.params['project'] != 'try':
# for non-try branches, include SETA
jobdesc['optimization'] = {'skip-unless-schedules-or-seta': schedules}
else:
# otherwise just use skip-unless-schedules
jobdesc['optimization'] = {'skip-unless-schedules': schedules}
run = jobdesc['run'] = {}
run['using'] = 'mozharness-test'