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 from recipe_engine import recipe_api | 5 from recipe_engine import recipe_api |
6 | 6 |
7 class GomaApi(recipe_api.RecipeApi): | 7 class GomaApi(recipe_api.RecipeApi): |
8 """GomaApi contains helper functions for using goma.""" | 8 """GomaApi contains helper functions for using goma.""" |
9 | 9 |
10 def __init__(self, **kwargs): | 10 def __init__(self, **kwargs): |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 StepFailure if it fails to stop goma or upload logs. | 178 StepFailure if it fails to stop goma or upload logs. |
179 """ | 179 """ |
180 | 180 |
181 assert self._goma_dir | 181 assert self._goma_dir |
182 assert self._goma_started | 182 assert self._goma_started |
183 | 183 |
184 with self.m.step.defer_results(): | 184 with self.m.step.defer_results(): |
185 self.m.python(name='goma_jsonstatus', script=self.goma_ctl, | 185 self.m.python(name='goma_jsonstatus', script=self.goma_ctl, |
186 args=['jsonstatus', self.json_path], | 186 args=['jsonstatus', self.json_path], |
187 env=self._goma_ctl_env, **kwargs) | 187 env=self._goma_ctl_env, **kwargs) |
| 188 self.m.python(name='goma_stat', script=self.goma_ctl, |
| 189 args=['stat'], |
| 190 env=self._goma_ctl_env, **kwargs) |
188 self.m.python(name='stop_goma', script=self.goma_ctl, | 191 self.m.python(name='stop_goma', script=self.goma_ctl, |
189 args=['stop'], env=self._goma_ctl_env, **kwargs) | 192 args=['stop'], env=self._goma_ctl_env, **kwargs) |
190 self._upload_logs(ninja_log_outdir, ninja_log_compiler, | 193 self._upload_logs(ninja_log_outdir, ninja_log_compiler, |
191 ninja_log_command, ninja_log_exit_status) | 194 ninja_log_command, ninja_log_exit_status) |
192 self._stop_cloudtail() | 195 self._stop_cloudtail() |
193 | 196 |
194 self._goma_started = False | 197 self._goma_started = False |
195 self._goma_ctl_env = {} | 198 self._goma_ctl_env = {} |
196 | 199 |
197 def _upload_logs(self, ninja_log_outdir=None, ninja_log_compiler=None, | 200 def _upload_logs(self, ninja_log_outdir=None, ninja_log_compiler=None, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 ]) | 240 ]) |
238 | 241 |
239 | 242 |
240 self.m.python( | 243 self.m.python( |
241 name=name or 'upload_log', | 244 name=name or 'upload_log', |
242 script=self.package_repo_resource( | 245 script=self.package_repo_resource( |
243 'scripts', 'slave', 'upload_goma_logs.py'), | 246 'scripts', 'slave', 'upload_goma_logs.py'), |
244 args=args, | 247 args=args, |
245 env=self._goma_ctl_env | 248 env=self._goma_ctl_env |
246 ) | 249 ) |
OLD | NEW |