Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 2192563004: [Android] Move host_info from test config to recipe step for android perf bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: [Android] Move host_info from test config to recipe step for android perf bots. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/android/perf.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromium_android/api.py
diff --git a/scripts/slave/recipe_modules/chromium_android/api.py b/scripts/slave/recipe_modules/chromium_android/api.py
index fbfec8e17be6e2345d98e4734bab22c907cf8e2d..3f875bf7865b03d6cfc2e5570b7b6a14bc00821f 100644
--- a/scripts/slave/recipe_modules/chromium_android/api.py
+++ b/scripts/slave/recipe_modules/chromium_android/api.py
@@ -370,6 +370,57 @@ class AndroidApi(recipe_api.RecipeApi):
self.device_recovery()
return self.device_status()
+ def host_info(self, args=[], **kwargs):
+ try:
+ with self.handle_exit_codes():
+ args.extend(['run', '--output', self.m.json.output()])
+ self.m.step(
+ 'Host_Info',
+ [self.m.path['checkout'].join('testing', 'scripts',
+ 'host_info.py')] + args,
+ env=self.m.chromium.get_env(),
+ infra_step=True,
+ step_test_data=lambda: self.m.json.test_api.output({
+ 'valid': True,
+ 'failures': [],
+ '_host_info': {
+ 'os_system': 'os_system',
+ 'os_release': 'os_release',
+ 'processor': 'processor',
+ 'num_cpus': 'num_cpus',
+ 'free_disk_space': 'free_disk_space',
+ 'python_version': 'python_version',
+ 'python_path': 'python_path',
+ 'devices': [{
+ "usb_status": True,
+ "blacklisted": None,
+ "ro.build.fingerprint": "fingerprint",
+ "battery": {
+ "status": "5",
+ "scale": "100",
+ "temperature": "240",
+ "level": "100",
+ "technology": "Li-ion",
+ "AC powered": "false",
+ "health": "2",
+ "voltage": "4302",
+ "Wireless powered": "false",
+ "USB powered": "true",
+ "Max charging current": "500000",
+ "present": "true"
+ },
+ "adb_status": "device",
+ "imei_slice": "",
+ "ro.build.product": "bullhead",
+ "ro.build.id": "MDB08Q",
+ "serial": "00d0d567893340f4",
+ "wifi_ip": ""
+ }]
+ }}),
+ **kwargs)
+ except self.m.step.InfraFailure:
+ pass
+
def device_recovery(self, restart_usb=False, **kwargs):
args = [
'--blacklist-file', self.blacklist_file,
« no previous file with comments | « no previous file | scripts/slave/recipes/android/perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698