| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 class ChromiumApi(recipe_api.RecipeApi): | 7 class ChromiumApi(recipe_api.RecipeApi): |
| 8 def get_config_defaults(self): | 8 def get_config_defaults(self): |
| 9 return { | 9 return { |
| 10 'HOST_PLATFORM': self.m.platform.name, | 10 'HOST_PLATFORM': self.m.platform.name, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 test += '.exe' | 54 test += '.exe' |
| 55 | 55 |
| 56 full_args = [ | 56 full_args = [ |
| 57 '--target', self.c.build_config_fs, | 57 '--target', self.c.build_config_fs, |
| 58 '--build-dir', self.m.path.checkout(self.c.build_dir), | 58 '--build-dir', self.m.path.checkout(self.c.build_dir), |
| 59 ('--xvfb' if xvfb else '--no-xvfb') | 59 ('--xvfb' if xvfb else '--no-xvfb') |
| 60 ] | 60 ] |
| 61 full_args += self.m.json.property_args() | 61 full_args += self.m.json.property_args() |
| 62 if annotate: | 62 if annotate: |
| 63 full_args.append('--annotate=%s' % annotate) | 63 full_args.append('--annotate=%s' % annotate) |
| 64 kwargs['allow_subannotations'] = True |
| 64 if results_url: | 65 if results_url: |
| 65 full_args.append('--results-url=%s' % results_url) | 66 full_args.append('--results-url=%s' % results_url) |
| 66 if ext == '.py': | 67 if ext == '.py': |
| 67 full_args.append('--run-python-script') | 68 full_args.append('--run-python-script') |
| 68 full_args.append(test) | 69 full_args.append(test) |
| 69 full_args.extend(args) | 70 full_args.extend(args) |
| 70 | 71 |
| 71 # By default, don't abort the recipe for a single test failure. | 72 # By default, don't abort the recipe for a single test failure. |
| 72 kwargs.setdefault('can_fail_build', False) | 73 kwargs.setdefault('can_fail_build', False) |
| 73 | 74 |
| 74 return self.m.python( | 75 return self.m.python( |
| 75 name or t_name, | 76 name or t_name, |
| 76 self.m.path.build('scripts', 'slave', 'runtest.py'), | 77 self.m.path.build('scripts', 'slave', 'runtest.py'), |
| 77 full_args, | 78 full_args, |
| 78 **kwargs | 79 **kwargs |
| 79 ) | 80 ) |
| 80 | 81 |
| 81 def runhooks(self, **kwargs): | 82 def runhooks(self, **kwargs): |
| 82 """Run the build-configuration hooks for chromium.""" | 83 """Run the build-configuration hooks for chromium.""" |
| 83 env = kwargs.get('env', {}) | 84 env = kwargs.get('env', {}) |
| 84 env.update(self.c.gyp_env.as_jsonish()) | 85 env.update(self.c.gyp_env.as_jsonish()) |
| 85 kwargs['env'] = env | 86 kwargs['env'] = env |
| 86 return self.m.gclient.runhooks(**kwargs) | 87 return self.m.gclient.runhooks(**kwargs) |
| 87 | 88 |
| OLD | NEW |