Bug 1355180: introduce run-on-projects: built-projects, and use it; r=jmaher
This test-only "run-on-projects" option indicates that the test should run on exactly the projects where its parent build runs. This avoids the situation where a build is configured to *not* run on a project, but some wayward test didn't get the memo and "pulls in" the build anyway. This has been particularly problematic with win64-asan/opt. MozReview-Commit-ID: 8UP6FsXBohy
This commit is contained in:
@@ -99,9 +99,13 @@ test_description_schema = Schema({
|
||||
# The `run_on_projects` attribute, defaulting to "all". This dictates the
|
||||
# projects on which this task should be included in the target task set.
|
||||
# See the attributes documentation for details.
|
||||
Optional('run-on-projects', default=['all']): optionally_keyed_by(
|
||||
#
|
||||
# Note that the special case 'built-projects', the default, uses the parent
|
||||
# build task's run-on-projects, meaning that tests run only on platforms
|
||||
# that are built.
|
||||
Optional('run-on-projects', default='built-projects'): optionally_keyed_by(
|
||||
'test-platform',
|
||||
[basestring]),
|
||||
Any([basestring], 'built-projects')),
|
||||
|
||||
# the sheriffing tier for this task (default: set based on test platform)
|
||||
Optional('tier'): optionally_keyed_by(
|
||||
@@ -268,6 +272,9 @@ test_description_schema = Schema({
|
||||
# the label of the build task generating the materials to test
|
||||
'build-label': basestring,
|
||||
|
||||
# the build's attributes
|
||||
'build-attributes': {basestring: object},
|
||||
|
||||
# the platform on which the tests will run
|
||||
'test-platform': basestring,
|
||||
|
||||
@@ -326,7 +333,7 @@ def set_defaults(config, tests):
|
||||
|
||||
test.setdefault('os-groups', [])
|
||||
test.setdefault('chunks', 1)
|
||||
test.setdefault('run-on-projects', ['all'])
|
||||
test.setdefault('run-on-projects', 'built-projects')
|
||||
test.setdefault('instance-size', 'default')
|
||||
test.setdefault('max-run-time', 3600)
|
||||
test.setdefault('reboot', True)
|
||||
@@ -510,6 +517,15 @@ def enable_code_coverage(config, tests):
|
||||
yield test
|
||||
|
||||
|
||||
@transforms.add
|
||||
def handle_run_on_projects(config, tests):
|
||||
"""Handle translating `built-projects` appropriately"""
|
||||
for test in tests:
|
||||
if test['run-on-projects'] == 'built-projects':
|
||||
test['run-on-projects'] = test['build-attributes'].get('run_on_projects', ['all'])
|
||||
yield test
|
||||
|
||||
|
||||
@transforms.add
|
||||
def split_e10s(config, tests):
|
||||
for test in tests:
|
||||
@@ -696,7 +712,7 @@ def make_job_description(config, tests):
|
||||
jobdesc['dependencies'] = {'build': build_label}
|
||||
jobdesc['expires-after'] = test['expires-after']
|
||||
jobdesc['routes'] = []
|
||||
jobdesc['run-on-projects'] = test.get('run-on-projects', ['all'])
|
||||
jobdesc['run-on-projects'] = test['run-on-projects']
|
||||
jobdesc['scopes'] = []
|
||||
jobdesc['tags'] = test.get('tags', {})
|
||||
jobdesc['optimizations'] = [['seta']] # always run SETA for tests
|
||||
|
||||
Reference in New Issue
Block a user