зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1305242 - Disable linux64-jsdcov and linux64-ccov from running on try with '-u all'. r=dustin
This patch prevents tests which have the 'run_on_projects' attribute assigned to an empty set from running when the try message contains '-p all' and '-u all' together. It also makes the 'match_test' function a little more readable and updates the 'attributes.rst' document to reflect the changes that were made. MozReview-Commit-ID: IMk0cmSza8U --HG-- extra : rebase_source : 06d542cbec16bd8091bc282ad1b831fb4671e72a
This commit is contained in:
Родитель
b500e0c2fe
Коммит
7bf3a43886
|
@ -34,7 +34,7 @@ For try, this attribute applies only if ``-p all`` is specified. All jobs can
|
|||
be specified by name regardless of ``run_on_projects``.
|
||||
|
||||
If ``run_on_projects`` is set to an empty list, then the task will not run
|
||||
anywhere, unless specified explicitly in try syntax.
|
||||
anywhere, unless its build platform is specified explicitly in try syntax.
|
||||
|
||||
task_duplicates
|
||||
===============
|
||||
|
|
|
@ -497,24 +497,30 @@ class TryOptionSyntax(object):
|
|||
def task_matches(self, attributes):
|
||||
attr = attributes.get
|
||||
|
||||
def check_run_on_projects():
|
||||
return set(['try', 'all']) & set(attr('run_on_projects', []))
|
||||
|
||||
def match_test(try_spec, attr_name):
|
||||
if attr('build_type') not in self.build_types:
|
||||
return False
|
||||
if self.platforms is not None:
|
||||
if attr('build_platform') not in self.platforms:
|
||||
return False
|
||||
if try_spec is not None:
|
||||
# TODO: optimize this search a bit
|
||||
for test in try_spec:
|
||||
if attr(attr_name) == test['test']:
|
||||
break
|
||||
else:
|
||||
return False
|
||||
if 'platforms' in test and attr('test_platform') not in test['platforms']:
|
||||
return False
|
||||
if 'only_chunks' in test and attr('test_chunk') not in test['only_chunks']:
|
||||
else:
|
||||
if not check_run_on_projects():
|
||||
return False
|
||||
if try_spec is None:
|
||||
return True
|
||||
# TODO: optimize this search a bit
|
||||
for test in try_spec:
|
||||
if attr(attr_name) == test['test']:
|
||||
break
|
||||
else:
|
||||
return False
|
||||
if 'platforms' in test and attr('test_platform') not in test['platforms']:
|
||||
return False
|
||||
if 'only_chunks' in test and attr('test_chunk') not in test['only_chunks']:
|
||||
return False
|
||||
return True
|
||||
|
||||
if attr('kind') in ('desktop-test', 'android-test'):
|
||||
|
@ -529,7 +535,7 @@ class TryOptionSyntax(object):
|
|||
return False
|
||||
elif self.platforms is None:
|
||||
# for "-p all", look for try in the 'run_on_projects' attribute
|
||||
return set(['try', 'all']) & set(attr('run_on_projects', []))
|
||||
return check_run_on_projects()
|
||||
else:
|
||||
if attr('build_platform') not in self.platforms:
|
||||
return False
|
||||
|
|
Загрузка…
Ссылка в новой задаче