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

Side by Side Diff: build/android/pylib/device/device_utils.py

Issue 643973002: Add multi-architecture support in telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add full multi-arch support. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 """Provides a variety of device interactions based on adb. 5 """Provides a variety of device interactions based on adb.
6 6
7 Eventually, this will be based on adb_wrapper. 7 Eventually, this will be based on adb_wrapper.
8 """ 8 """
9 # pylint: disable=W0613 9 # pylint: disable=W0613
10 10
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 value: A string containing the value to set to the property on the 726 value: A string containing the value to set to the property on the
727 device. 727 device.
728 timeout: timeout in seconds 728 timeout: timeout in seconds
729 retries: number of retries 729 retries: number of retries
730 730
731 Raises: 731 Raises:
732 CommandTimeoutError on timeout. 732 CommandTimeoutError on timeout.
733 """ 733 """
734 self.old_interface.system_properties[property_name] = value 734 self.old_interface.system_properties[property_name] = value
735 735
736 def GetABI(self):
737 """Gets the device main ABI.
738 """
739 return self.GetProp('ro.product.cpu.abi')
pasko 2014/10/14 14:15:42 sounds good enough for now :)
740
736 @decorators.WithTimeoutAndRetriesFromInstance() 741 @decorators.WithTimeoutAndRetriesFromInstance()
737 def GetPids(self, process_name, timeout=None, retries=None): 742 def GetPids(self, process_name, timeout=None, retries=None):
738 """Returns the PIDs of processes with the given name. 743 """Returns the PIDs of processes with the given name.
739 744
740 Note that the |process_name| is often the package name. 745 Note that the |process_name| is often the package name.
741 746
742 Args: 747 Args:
743 process_name: A string containing the process name to get the PIDs for. 748 process_name: A string containing the process name to get the PIDs for.
744 timeout: timeout in seconds 749 timeout: timeout in seconds
745 retries: number of retries 750 retries: number of retries
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 Returns: 867 Returns:
863 A Parallelizer operating over |devices|. 868 A Parallelizer operating over |devices|.
864 """ 869 """
865 if not devices or len(devices) == 0: 870 if not devices or len(devices) == 0:
866 devices = pylib.android_commands.GetAttachedDevices() 871 devices = pylib.android_commands.GetAttachedDevices()
867 parallelizer_type = (parallelizer.Parallelizer if async 872 parallelizer_type = (parallelizer.Parallelizer if async
868 else parallelizer.SyncParallelizer) 873 else parallelizer.SyncParallelizer)
869 return parallelizer_type([ 874 return parallelizer_type([
870 d if isinstance(d, DeviceUtils) else DeviceUtils(d) 875 d if isinstance(d, DeviceUtils) else DeviceUtils(d)
871 for d in devices]) 876 for d in devices])
872
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698