| 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 16 matching lines...) Expand all  Loading... | 
| 27     self.builder_name = self.m.properties['buildername'] | 27     self.builder_name = self.m.properties['buildername'] | 
| 28     self.master_name = self.m.properties['mastername'] | 28     self.master_name = self.m.properties['mastername'] | 
| 29     self.slave_name = self.m.properties['slavename'] | 29     self.slave_name = self.m.properties['slavename'] | 
| 30     self.build_number = self.m.properties['buildnumber'] | 30     self.build_number = self.m.properties['buildnumber'] | 
| 31 | 31 | 
| 32     self.slave_dir = self.m.path['slave_build'] | 32     self.slave_dir = self.m.path['slave_build'] | 
| 33     self.checkout_root = self.slave_dir | 33     self.checkout_root = self.slave_dir | 
| 34     self.default_env = {} | 34     self.default_env = {} | 
| 35     self.gclient_env = {} | 35     self.gclient_env = {} | 
| 36     self.is_compile_bot = self.builder_name.startswith('Build-') | 36     self.is_compile_bot = self.builder_name.startswith('Build-') | 
|  | 37     self.no_buildbot = self.m.properties.get('nobuildbot', '') == 'True' | 
| 37 | 38 | 
| 38     self.default_env['CHROME_HEADLESS'] = '1' | 39     self.default_env['CHROME_HEADLESS'] = '1' | 
| 39     # The 'depot_tools' directory comes from recipe DEPS and isn't provided by | 40     # The 'depot_tools' directory comes from recipe DEPS and isn't provided by | 
| 40     # default. We have to set it manually. | 41     # default. We have to set it manually. | 
| 41     self.m.path.c.base_paths['depot_tools'] = ( | 42     self.m.path.c.base_paths['depot_tools'] = ( | 
| 42         self.m.path.c.base_paths['slave_build'] + | 43         self.m.path.c.base_paths['slave_build'] + | 
| 43         ('skia', 'infra', 'bots', '.recipe_deps', 'depot_tools')) | 44         ('skia', 'infra', 'bots', '.recipe_deps', 'depot_tools')) | 
| 44     if 'Win' in self.builder_name: | 45     if 'Win' in self.builder_name: | 
| 45       self.m.path.c.base_paths['depot_tools'] = ( | 46       self.m.path.c.base_paths['depot_tools'] = ( | 
| 46           'c:\\', 'Users', 'chrome-bot', 'depot_tools') | 47           'c:\\', 'Users', 'chrome-bot', 'depot_tools') | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 99     if self.role == self.m.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: | 100     if self.role == self.m.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: | 
| 100       self.configuration = CONFIG_RELEASE | 101       self.configuration = CONFIG_RELEASE | 
| 101     else: | 102     else: | 
| 102       self.configuration = self.builder_cfg.get('configuration', CONFIG_DEBUG) | 103       self.configuration = self.builder_cfg.get('configuration', CONFIG_DEBUG) | 
| 103     arch = (self.builder_cfg.get('arch') or self.builder_cfg.get('target_arch')) | 104     arch = (self.builder_cfg.get('arch') or self.builder_cfg.get('target_arch')) | 
| 104     if ('Win' in self.builder_cfg.get('os', '') and arch == 'x86_64'): | 105     if ('Win' in self.builder_cfg.get('os', '') and arch == 'x86_64'): | 
| 105       self.configuration += '_x64' | 106       self.configuration += '_x64' | 
| 106 | 107 | 
| 107     self.default_env.update({'SKIA_OUT': self.skia_out, | 108     self.default_env.update({'SKIA_OUT': self.skia_out, | 
| 108                              'BUILDTYPE': self.configuration}) | 109                              'BUILDTYPE': self.configuration}) | 
| 109     self.is_trybot = self.builder_cfg['is_trybot'] | 110 | 
| 110     self.patch_storage = self.m.properties.get('patch_storage', 'rietveld') | 111     self.patch_storage = self.m.properties.get('patch_storage', 'rietveld') | 
| 111     self.issue = None | 112     self.issue = None | 
| 112     self.patchset = None | 113     self.patchset = None | 
| 113     if self.is_trybot: | 114     if self.no_buildbot: | 
| 114       if self.patch_storage == 'gerrit': | 115       self.is_trybot = ( | 
| 115         self.issue = self.m.properties['event.change.number'] | 116           self.m.properties.get('issue', '') and | 
| 116         self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1] | 117           self.m.properties.get('patchset', '')) | 
| 117       else: | 118       if self.is_trybot: | 
| 118         self.issue = self.m.properties['issue'] | 119         self.issue = self.m.properties['issue'] | 
| 119         self.patchset = self.m.properties['patchset'] | 120         self.patchset = self.m.properties['patchset'] | 
|  | 121     else: | 
|  | 122       self.is_trybot = self.builder_cfg['is_trybot'] | 
|  | 123       if self.is_trybot: | 
|  | 124         if self.patch_storage == 'gerrit': | 
|  | 125           self.issue = self.m.properties['event.change.number'] | 
|  | 126           self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1] | 
|  | 127         else: | 
|  | 128           self.issue = self.m.properties['issue'] | 
|  | 129           self.patchset = self.m.properties['patchset'] | 
|  | 130 | 
| 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', | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 152       'TSAN', | 163       'TSAN', | 
| 153       'UBSAN', | 164       'UBSAN', | 
| 154       'Valgrind', | 165       'Valgrind', | 
| 155     ] | 166     ] | 
| 156     upload_perf_results = True | 167     upload_perf_results = True | 
| 157     for s in skip_upload_bots: | 168     for s in skip_upload_bots: | 
| 158       if s in self.m.properties['buildername']: | 169       if s in self.m.properties['buildername']: | 
| 159         upload_perf_results = False | 170         upload_perf_results = False | 
| 160         break | 171         break | 
| 161     return upload_perf_results | 172     return upload_perf_results | 
| OLD | NEW | 
|---|