зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1384905 - Take 2 - [tc-migration] Windows 8 should not be triggered on try (unless specified) r=dustin
The first version of the patch didn't account for the fact that if we did -p all we still couldn't do -u foo[Windows 8] specifically: -p all means self.platforms is None https://hg.mozilla.org/mozilla-central/file/16ffc1d05422/taskcluster/taskgraph/try_option_syntax.py#l563 Then we check if the *test* has a run_on_projects that has either `all` or `try`, it doesn't so we abort. In new code, we merely set a flag to say don't-run-me-by-default and use that in a few places. MozReview-Commit-ID: 6rjNVZvpYGA --HG-- extra : rebase_source : 4c791c9e566a5eddc2bb2e820bab0090f9db1237
This commit is contained in:
Родитель
cb6bc0b8f6
Коммит
21f520f36d
|
@ -558,6 +558,7 @@ class TryOptionSyntax(object):
|
|||
return set(['try', 'all']) & set(attr('run_on_projects', []))
|
||||
|
||||
def match_test(try_spec, attr_name):
|
||||
run_by_default = True
|
||||
if attr('build_type') not in self.build_types:
|
||||
return False
|
||||
if self.platforms is not None:
|
||||
|
@ -565,9 +566,9 @@ class TryOptionSyntax(object):
|
|||
return False
|
||||
else:
|
||||
if not check_run_on_projects():
|
||||
return False
|
||||
run_by_default = False
|
||||
if try_spec is None:
|
||||
return True
|
||||
return run_by_default
|
||||
# TODO: optimize this search a bit
|
||||
for test in try_spec:
|
||||
if attr(attr_name) == test['test']:
|
||||
|
@ -580,8 +581,10 @@ class TryOptionSyntax(object):
|
|||
platform = attr('test_platform', '').split('/')[0]
|
||||
# Platforms can be forced by syntax like "-u xpcshell[Windows 8]"
|
||||
return platform in test['platforms']
|
||||
else:
|
||||
elif run_by_default:
|
||||
return check_run_on_projects()
|
||||
else:
|
||||
return False
|
||||
|
||||
job_try_name = attr('job_try_name')
|
||||
if job_try_name:
|
||||
|
|
Загрузка…
Ссылка в новой задаче