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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 self.configuration = CONFIG_RELEASE | 103 self.configuration = CONFIG_RELEASE |
104 else: | 104 else: |
105 self.configuration = self.builder_cfg.get('configuration', CONFIG_DEBUG) | 105 self.configuration = self.builder_cfg.get('configuration', CONFIG_DEBUG) |
106 arch = (self.builder_cfg.get('arch') or self.builder_cfg.get('target_arch')) | 106 arch = (self.builder_cfg.get('arch') or self.builder_cfg.get('target_arch')) |
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 self.is_trybot = self.builder_cfg['is_trybot'] | 112 self.is_trybot = self.builder_cfg['is_trybot'] |
| 113 self.patch_storage = self.m.properties.get('patch_storage') |
| 114 |
| 115 self.gerrit_repository = None |
| 116 self.gerrit_ref = None |
| 117 self.gerrit_issue = None |
| 118 |
113 self.issue = None | 119 self.issue = None |
114 self.patchset = None | 120 self.patchset = None |
115 self.rietveld = None | 121 self.rietveld = None |
116 if self.is_trybot: | 122 if self.is_trybot: |
117 self.issue = self.m.properties['issue'] | 123 if self.patch_storage == 'gerrit': |
118 self.patchset = self.m.properties['patchset'] | 124 self.gerrit_repository = self.m.properties['repository'] |
119 self.rietveld = self.m.properties['rietveld'] | 125 self.gerrit_ref = self.m.properties['event.patchSet.ref'] |
| 126 self.gerrit_issue = self.m.properties['event.change.number'] |
| 127 else: |
| 128 self.issue = self.m.properties['issue'] |
| 129 self.patchset = self.m.properties['patchset'] |
| 130 self.rietveld = self.m.properties['rietveld'] |
120 self.dm_dir = self.m.path.join( | 131 self.dm_dir = self.m.path.join( |
121 self.swarming_out_dir, 'dm') | 132 self.swarming_out_dir, 'dm') |
122 self.perf_data_dir = self.m.path.join(self.swarming_out_dir, | 133 self.perf_data_dir = self.m.path.join(self.swarming_out_dir, |
123 'perfdata', self.builder_name, 'data') | 134 'perfdata', self.builder_name, 'data') |
124 | 135 |
125 @property | 136 @property |
126 def upload_dm_results(self): | 137 def upload_dm_results(self): |
127 # TODO(borenet): Move this into the swarm_test recipe. | 138 # TODO(borenet): Move this into the swarm_test recipe. |
128 skip_upload_bots = [ | 139 skip_upload_bots = [ |
129 'ASAN', | 140 'ASAN', |
130 'Coverage', | 141 'Coverage', |
131 'MSAN', | 142 'MSAN', |
132 'TSAN', | 143 'TSAN', |
133 'UBSAN', | 144 'UBSAN', |
134 'Valgrind', | 145 'Valgrind', |
135 ] | 146 ] |
136 upload_dm_results = True | 147 upload_dm_results = True |
137 for s in skip_upload_bots: | 148 for s in skip_upload_bots: |
138 if s in self.m.properties['buildername']: | 149 if s in self.m.properties['buildername']: |
139 upload_dm_results = False | 150 upload_dm_results = False |
140 break | 151 break |
141 return upload_dm_results | 152 return upload_dm_results |
142 | 153 |
143 @property | 154 @property |
144 def upload_perf_results(self): | 155 def upload_perf_results(self): |
145 # TODO(borenet): Move this into the swarm_perf recipe. | 156 # TODO(borenet): Move this into the swarm_perf recipe. |
146 return ('Release' in self.m.properties['buildername']) | 157 return ('Release' in self.m.properties['buildername']) |
OLD | NEW |