| 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', '') |
| 113 self.issue = None | 114 self.issue = None |
| 114 self.patchset = None | 115 self.patchset = None |
| 115 self.rietveld = None | |
| 116 if self.is_trybot: | 116 if self.is_trybot: |
| 117 self.issue = self.m.properties['issue'] | 117 if self.patch_storage == 'gerrit': |
| 118 self.patchset = self.m.properties['patchset'] | 118 self.issue = self.m.properties['event.change.number'] |
| 119 self.rietveld = self.m.properties['rietveld'] | 119 self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1] |
| 120 else: |
| 121 self.issue = self.m.properties['issue'] |
| 122 self.patchset = self.m.properties['patchset'] |
| 120 self.dm_dir = self.m.path.join( | 123 self.dm_dir = self.m.path.join( |
| 121 self.swarming_out_dir, 'dm') | 124 self.swarming_out_dir, 'dm') |
| 122 self.perf_data_dir = self.m.path.join(self.swarming_out_dir, | 125 self.perf_data_dir = self.m.path.join(self.swarming_out_dir, |
| 123 'perfdata', self.builder_name, 'data') | 126 'perfdata', self.builder_name, 'data') |
| 124 | 127 |
| 125 @property | 128 @property |
| 126 def upload_dm_results(self): | 129 def upload_dm_results(self): |
| 127 # TODO(borenet): Move this into the swarm_test recipe. | 130 # TODO(borenet): Move this into the swarm_test recipe. |
| 128 skip_upload_bots = [ | 131 skip_upload_bots = [ |
| 129 'ASAN', | 132 'ASAN', |
| 130 'Coverage', | 133 'Coverage', |
| 131 'MSAN', | 134 'MSAN', |
| 132 'TSAN', | 135 'TSAN', |
| 133 'UBSAN', | 136 'UBSAN', |
| 134 'Valgrind', | 137 'Valgrind', |
| 135 ] | 138 ] |
| 136 upload_dm_results = True | 139 upload_dm_results = True |
| 137 for s in skip_upload_bots: | 140 for s in skip_upload_bots: |
| 138 if s in self.m.properties['buildername']: | 141 if s in self.m.properties['buildername']: |
| 139 upload_dm_results = False | 142 upload_dm_results = False |
| 140 break | 143 break |
| 141 return upload_dm_results | 144 return upload_dm_results |
| 142 | 145 |
| 143 @property | 146 @property |
| 144 def upload_perf_results(self): | 147 def upload_perf_results(self): |
| 145 # TODO(borenet): Move this into the swarm_perf recipe. | 148 # TODO(borenet): Move this into the swarm_perf recipe. |
| 146 return ('Release' in self.m.properties['buildername']) | 149 return ('Release' in self.m.properties['buildername']) |
| OLD | NEW |