| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import copy | 5 import copy |
| 6 | 6 |
| 7 from recipe_engine import recipe_api | 7 from recipe_engine import recipe_api |
| 8 | 8 |
| 9 | 9 |
| 10 class iOSApi(recipe_api.RecipeApi): | 10 class iOSApi(recipe_api.RecipeApi): |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 step_result.json.output['Xcode Version'], | 34 step_result.json.output['Xcode Version'], |
| 35 step_result.json.output['Xcode Build Version'], | 35 step_result.json.output['Xcode Build Version'], |
| 36 ) | 36 ) |
| 37 return step_result | 37 return step_result |
| 38 | 38 |
| 39 def checkout(self, **kwargs): | 39 def checkout(self, **kwargs): |
| 40 """Checks out Chromium.""" | 40 """Checks out Chromium.""" |
| 41 kwargs.setdefault('force', True) | 41 kwargs.setdefault('force', True) |
| 42 self.m.gclient.set_config('ios') | 42 self.m.gclient.set_config('ios') |
| 43 | 43 |
| 44 checkout_dir = self.m.chromium_tests.get_checkout_dir({}) | 44 checkout_dir = self.m.chromium_checkout.get_checkout_dir({}) |
| 45 if checkout_dir: | 45 if checkout_dir: |
| 46 kwargs.setdefault('cwd', checkout_dir) | 46 kwargs.setdefault('cwd', checkout_dir) |
| 47 | 47 |
| 48 return self.m.bot_update.ensure_checkout(**kwargs) | 48 return self.m.bot_update.ensure_checkout(**kwargs) |
| 49 | 49 |
| 50 @property | 50 @property |
| 51 def compiler(self): | 51 def compiler(self): |
| 52 assert self.__config is not None | 52 assert self.__config is not None |
| 53 return self.__config['compiler'] | 53 return self.__config['compiler'] |
| 54 | 54 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 name='generate_build_files' + suffix, | 334 name='generate_build_files' + suffix, |
| 335 mb_config_path=mb_config_path, | 335 mb_config_path=mb_config_path, |
| 336 gyp_script=gyp_script, | 336 gyp_script=gyp_script, |
| 337 build_dir='//out/' + build_sub_path) | 337 build_dir='//out/' + build_sub_path) |
| 338 | 338 |
| 339 use_analyze = self.__config['use_analyze'] | 339 use_analyze = self.__config['use_analyze'] |
| 340 if (use_analyze and | 340 if (use_analyze and |
| 341 self.compiler == 'ninja' and | 341 self.compiler == 'ninja' and |
| 342 self.m.tryserver.is_tryserver and | 342 self.m.tryserver.is_tryserver and |
| 343 'without patch' not in suffix): | 343 'without patch' not in suffix): |
| 344 affected_files = self.m.chromium_tests.get_files_affected_by_patch( | 344 affected_files = self.m.chromium_checkout.get_files_affected_by_patch( |
| 345 cwd=self.m.path['checkout']) | 345 cwd=self.m.path['checkout']) |
| 346 # The same test may be configured to run on multiple simulators. | 346 # The same test may be configured to run on multiple simulators. |
| 347 # Only specify each test once for the analyzer. | 347 # Only specify each test once for the analyzer. |
| 348 tests = list(set(test['app'] for test in self.__config['tests'])) | 348 tests = list(set(test['app'] for test in self.__config['tests'])) |
| 349 | 349 |
| 350 test_targets, compile_targets = ( | 350 test_targets, compile_targets = ( |
| 351 self.m.filter.analyze( | 351 self.m.filter.analyze( |
| 352 affected_files, | 352 affected_files, |
| 353 tests, | 353 tests, |
| 354 self.__config['additional_compile_targets'] + tests, | 354 self.__config['additional_compile_targets'] + tests, |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 self.configuration, | 765 self.configuration, |
| 766 'iossim', | 766 'iossim', |
| 767 ), | 767 ), |
| 768 'ninja': self.m.path.join( | 768 'ninja': self.m.path.join( |
| 769 'src', | 769 'src', |
| 770 build_dir, | 770 build_dir, |
| 771 '%s-%s' % (self.configuration, platform), | 771 '%s-%s' % (self.configuration, platform), |
| 772 'iossim', | 772 'iossim', |
| 773 ), | 773 ), |
| 774 }[self.compiler] | 774 }[self.compiler] |
| OLD | NEW |