| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 # In order to simplify the code that uses the values of self.__config, here | 143 # In order to simplify the code that uses the values of self.__config, here |
| 144 # we default to empty values of their respective types, so in other places | 144 # we default to empty values of their respective types, so in other places |
| 145 # we can iterate over them without having to check if they are in the dict | 145 # we can iterate over them without having to check if they are in the dict |
| 146 # at all. | 146 # at all. |
| 147 self.__config.setdefault('triggered bots', {}) | 147 self.__config.setdefault('triggered bots', {}) |
| 148 self.__config.setdefault('tests', []) | 148 self.__config.setdefault('tests', []) |
| 149 self.__config.setdefault('env', {}) | 149 self.__config.setdefault('env', {}) |
| 150 self.__config.setdefault('mb_type', None) | 150 self.__config.setdefault('mb_type', None) |
| 151 self.__config.setdefault('gn_args', []) | 151 self.__config.setdefault('gn_args', []) |
| 152 self.__config.setdefault('use_analyze', True) |
| 152 | 153 |
| 153 # Elements of the "tests" list are dicts. There are two types of elements, | 154 # Elements of the "tests" list are dicts. There are two types of elements, |
| 154 # determined by the presence of one of these mutually exclusive keys: | 155 # determined by the presence of one of these mutually exclusive keys: |
| 155 # "app": This says to run a particular app. | 156 # "app": This says to run a particular app. |
| 156 # "include": This says to include a common set of tests from include_dir. | 157 # "include": This says to include a common set of tests from include_dir. |
| 157 # So now we go through the "tests" list replacing any "include" keys. | 158 # So now we go through the "tests" list replacing any "include" keys. |
| 158 # The value of an "include" key is the name of a set of tests to include, | 159 # The value of an "include" key is the name of a set of tests to include, |
| 159 # which can be found as a .json file in include_dir. Read the contents | 160 # which can be found as a .json file in include_dir. Read the contents |
| 160 # lazily as needed into includes. | 161 # lazily as needed into includes. |
| 161 def read_include(includes): | 162 def read_include(includes): |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 ) | 297 ) |
| 297 if self.using_mb: | 298 if self.using_mb: |
| 298 step_result.presentation.step_text += '<br />GYP_CHROMIUM_NO_ACTION=1' | 299 step_result.presentation.step_text += '<br />GYP_CHROMIUM_NO_ACTION=1' |
| 299 | 300 |
| 300 if self.using_mb: | 301 if self.using_mb: |
| 301 self.m.chromium.run_mb(self.m.properties['mastername'], | 302 self.m.chromium.run_mb(self.m.properties['mastername'], |
| 302 self.m.properties['buildername'], | 303 self.m.properties['buildername'], |
| 303 name='generate_build_files' + suffix, | 304 name='generate_build_files' + suffix, |
| 304 build_dir='//out/' + build_sub_path) | 305 build_dir='//out/' + build_sub_path) |
| 305 | 306 |
| 306 if (self.compiler == 'ninja' and | 307 use_analyze = self.__config['use_analyze'] |
| 308 if (use_analyze and |
| 309 self.compiler == 'ninja' and |
| 307 self.m.tryserver.is_tryserver and | 310 self.m.tryserver.is_tryserver and |
| 308 'without patch' not in suffix): | 311 'without patch' not in suffix): |
| 309 affected_files = self.m.tryserver.get_files_affected_by_patch() | 312 affected_files = self.m.tryserver.get_files_affected_by_patch() |
| 310 # The same test may be configured to run on multiple simulators. | 313 # The same test may be configured to run on multiple simulators. |
| 311 # Only specify each test once for the analyzer. | 314 # Only specify each test once for the analyzer. |
| 312 tests = list(set(test['app'] for test in self.__config['tests'])) | 315 tests = list(set(test['app'] for test in self.__config['tests'])) |
| 313 | 316 |
| 314 test_targets, compile_targets = ( | 317 test_targets, compile_targets = ( |
| 315 self.m.chromium_tests.analyze( | 318 self.m.chromium_tests.analyze( |
| 316 affected_files, | 319 affected_files, |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 self.configuration, | 490 self.configuration, |
| 488 'iossim', | 491 'iossim', |
| 489 ), | 492 ), |
| 490 'ninja': self.m.path.join( | 493 'ninja': self.m.path.join( |
| 491 'src', | 494 'src', |
| 492 build_dir, | 495 build_dir, |
| 493 '%s-%s' % (self.configuration, platform), | 496 '%s-%s' % (self.configuration, platform), |
| 494 'iossim', | 497 'iossim', |
| 495 ), | 498 ), |
| 496 }[self.compiler] | 499 }[self.compiler] |
| OLD | NEW |