Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 from slave import recipe_api | 5 from slave import recipe_api |
| 6 | 6 |
| 7 | 7 |
| 8 class IsolateApi(recipe_api.RecipeApi): | 8 class IsolateApi(recipe_api.RecipeApi): |
| 9 """APIs for interacting with isolates.""" | 9 """APIs for interacting with isolates.""" |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 def isolated_tests(self): | 181 def isolated_tests(self): |
| 182 """The dictionary of 'target name -> isolated hash' for this run. | 182 """The dictionary of 'target name -> isolated hash' for this run. |
| 183 | 183 |
| 184 These come either from the incoming swarm_hashes build property, | 184 These come either from the incoming swarm_hashes build property, |
| 185 or from calling find_isolated_tests, above, at some point during the run. | 185 or from calling find_isolated_tests, above, at some point during the run. |
| 186 """ | 186 """ |
| 187 hashes = self.m.properties.get('swarm_hashes', self._isolated_tests) | 187 hashes = self.m.properties.get('swarm_hashes', self._isolated_tests) |
| 188 # Be robust in the case where swarm_hashes is an empty string | 188 # Be robust in the case where swarm_hashes is an empty string |
| 189 # instead of an empty dictionary, or similar. | 189 # instead of an empty dictionary, or similar. |
| 190 if not hashes: | 190 if not hashes: |
| 191 return {} | 191 return {} # pragma: no covergae |
|
Sergiy Byelozyorov
2015/02/14 03:47:25
this was needed because I couldn't come up with an
| |
| 192 return { | 192 return { |
| 193 k.encode('ascii'): v.encode('ascii') | 193 k.encode('ascii'): v.encode('ascii') |
| 194 for k, v in hashes.iteritems() | 194 for k, v in hashes.iteritems() |
| 195 } | 195 } |
| 196 | 196 |
| 197 @property | 197 @property |
| 198 def _run_isolated_path(self): | 198 def _run_isolated_path(self): |
| 199 """Returns the path to run_isolated.py.""" | 199 """Returns the path to run_isolated.py.""" |
| 200 return self.m.swarming_client.path.join('run_isolated.py') | 200 return self.m.swarming_client.path.join('run_isolated.py') |
| 201 | 201 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 """Compare the artifacts from 2 builds.""" | 276 """Compare the artifacts from 2 builds.""" |
| 277 args = [ | 277 args = [ |
| 278 '--first-build-dir', first_dir, | 278 '--first-build-dir', first_dir, |
| 279 '--second-build-dir', second_dir, | 279 '--second-build-dir', second_dir, |
| 280 '--target-platform', self.m.chromium.c.TARGET_PLATFORM | 280 '--target-platform', self.m.chromium.c.TARGET_PLATFORM |
| 281 ] | 281 ] |
| 282 self.m.python('compare_build_artifacts', | 282 self.m.python('compare_build_artifacts', |
| 283 self.resource('compare_build_artifacts.py'), | 283 self.resource('compare_build_artifacts.py'), |
| 284 args=args, | 284 args=args, |
| 285 cwd=self.m.path['slave_build']) | 285 cwd=self.m.path['slave_build']) |
| OLD | NEW |