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

Unified Diff: build/android/pylib/perf/setup.py

Issue 1105323002: [Android] Remove more uses of android_commands from build/android/pylib. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: build/android/pylib/perf/setup.py
diff --git a/build/android/pylib/perf/setup.py b/build/android/pylib/perf/setup.py
index 8884d602d417d8e61757091f562e928f4a50c0e3..e2d737df6eab138ed7afb26b723d13fe83625e93 100644
--- a/build/android/pylib/perf/setup.py
+++ b/build/android/pylib/perf/setup.py
@@ -10,10 +10,10 @@ import logging
import os
import shutil
-from pylib import android_commands
from pylib import constants
from pylib import forwarder
from pylib.device import device_list
+from pylib.device import device_utils
from pylib.perf import test_runner
from pylib.utils import test_environment
@@ -22,11 +22,12 @@ def _GetAllDevices():
devices_path = os.path.join(os.environ.get('CHROMIUM_OUT_DIR', 'out'),
device_list.LAST_DEVICES_FILENAME)
try:
- devices = device_list.GetPersistentDeviceList(devices_path)
+ devices = [device_utils.DeviceUtils(s)
+ for s in device_list.GetPersistentDeviceList(devices_path)]
except IOError as e:
logging.error('Unable to find %s [%s]', devices_path, e)
- devices = android_commands.GetAttachedDevices()
- return sorted(devices)
+ devices = device_utils.DeviceUtils.HealthyDevices()
+ return sorted(devices, key=lambda d: d.adb.GetDeviceSerial())
def _GetStepsDictFromSingleStep(test_options):

Powered by Google App Engine
This is Rietveld 408576698