Bug 1275943 - Ensure job tasks are added to target set even if no try syntax specified, r=dustin

Job tasks are tasks that are not tied to a specific build or test. As such, they cannot be scheduled
with the regular -p/-u try syntax options. There exists a -j try syntax option, to schedule them, which
defaults to running "all" of them if not specified.

However, there is a bug here where they will only default to "all" if a try syntax exists in the commit
message. They will not be considered if a developer pushes to try without a try syntax. This happens
because self.jobs is initially initialized with '[]' and we use None to determine when to schedule "all"
later on.

I want to move towards a world without try syntax, so we should start improving the UX of the no try
syntax use case.

Note: When I say "schedule" here, I mean added to the target set. They may still be optimized away.

MozReview-Commit-ID: 4TrC84RGiaL

--HG--
extra : rebase_source : 8fd50113c37745bc10181e1311cc62d75485723a
This commit is contained in:
Andrew Halberstadt 2016-11-14 14:29:50 -05:00
Родитель f6538f4a81
Коммит adbd485b6e
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -525,7 +525,8 @@ class TryOptionSyntax(object):
if attr('kind') in ('desktop-test', 'android-test'):
return match_test(self.unittests, 'unittest_try_name')
elif attr('kind') in JOB_KINDS:
if self.jobs is None:
# This will add 'job' tasks to the target set even if no try syntax was specified.
if not self.jobs:
return True
if attr('build_platform') in self.jobs:
return True