Chromium Code Reviews| Index: scripts/slave/recipe_modules/blimp/api.py |
| diff --git a/scripts/slave/recipe_modules/blimp/api.py b/scripts/slave/recipe_modules/blimp/api.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9085cb353bd9ac694074cc928b01abcd4d82b76a |
| --- /dev/null |
| +++ b/scripts/slave/recipe_modules/blimp/api.py |
| @@ -0,0 +1,45 @@ |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +from recipe_engine import recipe_api |
| +from recipe_engine.config_types import Path |
| + |
| +class BlimpApi(recipe_api.RecipeApi): |
| + def get_config_defaults(self): |
|
mikecase (-- gone --)
2016/10/15 00:05:37
not sure what this does. Do you need it?
shenghuazhang
2016/10/17 23:22:07
Seems like BaseConfig(CHECKOUT_PATH, **_kwargs) in
|
| + return { |
| + 'CHECKOUT_PATH': self.m.path['checkout'], |
| + } |
| + |
| + def run_engine_forwarder(self, output_linux_dir, **kwargs): |
|
mikecase (-- gone --)
2016/10/15 00:05:37
I would change this to be a context manager.
So i
shenghuazhang
2016/10/17 23:22:07
Done.
|
| + args = [ |
| + '-l', output_linux_dir, |
| + 'run', |
| + ] |
| + self.m.python('[Blimp] Starting engine and forwarder', |
| + self.c.client_engine_integration_script, |
| + args, |
| + **kwargs) |
| + |
| + # Installs apk in client and runs blimp. |
| + def load_client(self, output_linux_dir, apk_path, **kwargs): |
| + args = [ |
| + '-l', output_linux_dir, |
| + 'load', |
| + '--apk-path', apk_path, |
| + ] |
| + self.m.python('[Blimp] Installing apk and running blimp', |
| + self.c.client_engine_integration_script, |
| + args, |
| + **kwargs) |
| + |
| + def stop_engine_forwarder(self, output_linux_dir, **kwargs): |
| + args = [ |
| + '-l', output_linux_dir, |
| + 'stop', |
| + ] |
| + self.m.python('[Blimp] Killing engine and forwarder', |
| + self.c.client_engine_integration_script, |
| + args, |
| + **kwargs) |
| + |