OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 # pylint: disable=W0201 | 6 # pylint: disable=W0201 |
7 | 7 |
8 | 8 |
9 from recipe_engine import recipe_api | 9 from recipe_engine import recipe_api |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if ('Win' in self.builder_cfg.get('os', '') and arch == 'x86_64'): | 107 if ('Win' in self.builder_cfg.get('os', '') and arch == 'x86_64'): |
108 self.configuration += '_x64' | 108 self.configuration += '_x64' |
109 | 109 |
110 self.default_env.update({'SKIA_OUT': self.skia_out, | 110 self.default_env.update({'SKIA_OUT': self.skia_out, |
111 'BUILDTYPE': self.configuration}) | 111 'BUILDTYPE': self.configuration}) |
112 | 112 |
113 self.patch_storage = self.m.properties.get('patch_storage', 'rietveld') | 113 self.patch_storage = self.m.properties.get('patch_storage', 'rietveld') |
114 self.issue = None | 114 self.issue = None |
115 self.patchset = None | 115 self.patchset = None |
116 if self.no_buildbot: | 116 if self.no_buildbot: |
| 117 self.is_trybot = False |
117 if (self.m.properties.get('issue', '') and | 118 if (self.m.properties.get('issue', '') and |
118 self.m.properties.get('patchset', '')): | 119 self.m.properties.get('patchset', '')): |
119 self.is_trybot = True | 120 self.is_trybot = True |
120 self.issue = self.m.properties['issue'] | 121 self.issue = self.m.properties['issue'] |
121 self.patchset = self.m.properties['patchset'] | 122 self.patchset = self.m.properties['patchset'] |
122 elif (self.m.properties.get('event.change.number', '') and | 123 elif (self.m.properties.get('event.change.number', '') and |
123 self.m.properties.get('event.patchSet.ref', '')): | 124 self.m.properties.get('event.patchSet.ref', '')): |
124 self.is_trybot = True | 125 self.is_trybot = True |
125 self.issue = self.m.properties['event.change.number'] | 126 self.issue = self.m.properties['event.change.number'] |
126 self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1] | 127 self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1] |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 def swarming_task_id(self): | 195 def swarming_task_id(self): |
195 if not self._swarming_task_id: | 196 if not self._swarming_task_id: |
196 self._swarming_task_id = self.m.python.inline( | 197 self._swarming_task_id = self.m.python.inline( |
197 name='get swarming task id', | 198 name='get swarming task id', |
198 program='''import os | 199 program='''import os |
199 print os.environ.get('SWARMING_TASK_ID', '') | 200 print os.environ.get('SWARMING_TASK_ID', '') |
200 ''', | 201 ''', |
201 stdout=self.m.raw_io.output()).stdout.rstrip() | 202 stdout=self.m.raw_io.output()).stdout.rstrip() |
202 return self._swarming_task_id | 203 return self._swarming_task_id |
203 | 204 |
OLD | NEW |