1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 20:38:57 +00:00
This commit is contained in:
Sebastian Goscik 2016-03-17 14:11:29 +00:00
parent 17a395fbd4
commit 913d41c86d
7 changed files with 10 additions and 12 deletions

View File

@ -170,7 +170,7 @@ class SysfsExtractor(Instrument):
dev_dir = paths[self.DEVICE_PATH].strip('*') # remove potential trailing '*' dev_dir = paths[self.DEVICE_PATH].strip('*') # remove potential trailing '*'
if (not os.listdir(after_dir) and if (not os.listdir(after_dir) and
self.device.file_exists(dev_dir) and self.device.file_exists(dev_dir) and
self.device.listdir(dev_dir)): self.device.list_directory(dev_dir)):
self.logger.error('sysfs files were not pulled from the device.') self.logger.error('sysfs files were not pulled from the device.')
self.device_and_host_paths.remove(paths) # Path is removed to skip diffing it self.device_and_host_paths.remove(paths) # Path is removed to skip diffing it
for _, before_dir, after_dir, diff_dir in self.device_and_host_paths: for _, before_dir, after_dir, diff_dir in self.device_and_host_paths:

View File

@ -54,7 +54,6 @@ class StreamlineResourceGetter(ResourceGetter):
priority = GetterPriority.environment + 1 # run before standard enviroment resolvers. priority = GetterPriority.environment + 1 # run before standard enviroment resolvers.
dependencies_directory = os.path.join(settings.dependencies_directory, 'streamline') dependencies_directory = os.path.join(settings.dependencies_directory, 'streamline')
#old_dependencies_directory = os.path.join(settings.environment_root, 'streamline') # backwards compatibility
def get(self, resource, **kwargs): def get(self, resource, **kwargs):
if resource.owner.name != 'streamline': if resource.owner.name != 'streamline':

View File

@ -87,7 +87,7 @@ class ReventGetter(ResourceGetter):
self.resolver.register(self, 'revent', GetterPriority.package) self.resolver.register(self, 'revent', GetterPriority.package)
def get(self, resource, **kwargs): def get(self, resource, **kwargs):
filename = '.'.join([resource.owner.device.name, resource.stage, 'revent']).lower() filename = '.'.join([resource.owner.device.model, resource.stage, 'revent']).lower()
location = _d(os.path.join(self.get_base_location(resource), 'revent_files')) location = _d(os.path.join(self.get_base_location(resource), 'revent_files'))
for candidate in os.listdir(location): for candidate in os.listdir(location):
if candidate.lower() == filename.lower(): if candidate.lower() == filename.lower():
@ -137,8 +137,8 @@ class ExecutableGetter(ResourceGetter):
priority = GetterPriority.environment priority = GetterPriority.environment
def get(self, resource, **kwargs): def get(self, resource, **kwargs):
if settings.binaries_repository: if settings.assets_repository:
path = os.path.join(settings.binaries_repository, resource.platform, resource.filename) path = os.path.join(settings.assets_repository, resource.platform, resource.filename)
if os.path.isfile(path): if os.path.isfile(path):
return path return path
@ -162,7 +162,7 @@ class EnvironmentExecutableGetter(ExecutableGetter):
paths = [ paths = [
os.path.join(resource.owner.dependencies_directory, 'bin', os.path.join(resource.owner.dependencies_directory, 'bin',
resource.platform, resource.filename), resource.platform, resource.filename),
os.path.join(settings.environment_root, 'bin', os.path.join(settings.user_directory, 'bin',
resource.platform, resource.filename), resource.platform, resource.filename),
] ]
for path in paths: for path in paths:
@ -422,7 +422,7 @@ class RemoteFilerGetter(ResourceGetter):
result = None result = None
for entry in os.listdir(remote_path): for entry in os.listdir(remote_path):
remote_path = os.path.join(self.remote_path, entry) remote_path = os.path.join(self.remote_path, entry)
local_path = os.path.join(settings.environment_root, '__filer', settings.dependencies_directory, entry) local_path = os.path.join(settings.user_directory, '__filer', settings.dependencies_directory, entry)
result = self.try_get_resource(resource, version, remote_path, local_path) result = self.try_get_resource(resource, version, remote_path, local_path)
if result: if result:
break break
@ -454,7 +454,7 @@ class RemoteFilerGetter(ResourceGetter):
if os.path.exists(filepath): if os.path.exists(filepath):
return filepath return filepath
elif resource.name == 'revent': elif resource.name == 'revent':
filename = '.'.join([resource.owner.device.name, resource.stage, 'revent']).lower() filename = '.'.join([resource.owner.device.model, resource.stage, 'revent']).lower()
alternate_location = os.path.join(location, 'revent_files') alternate_location = os.path.join(location, 'revent_files')
# There tends to be some confusion as to where revent files should # There tends to be some confusion as to where revent files should
# be placed. This looks both in the plugin's directory, and in # be placed. This looks both in the plugin's directory, and in

View File

@ -374,4 +374,3 @@ class DVFS(ResultProcessor):
for i in range(self.device.number_of_cores * self.multiply_factor): for i in range(self.device.number_of_cores * self.multiply_factor):
temprow.append("{0:.3f}".format(temp["cpu{}".format(i)][offline_value])) temprow.append("{0:.3f}".format(temp["cpu{}".format(i)][offline_value]))
writer.writerow(temprow) writer.writerow(temprow)

View File

@ -52,7 +52,7 @@ def discover_sensors(device, sensor_kinds):
will be returned. will be returned.
""" """
hwmon_devices = device.listdir(HWMON_ROOT) hwmon_devices = device.list_directory(HWMON_ROOT)
path = device.path path = device.path
sensors = [] sensors = []
for hwmon_device in hwmon_devices: for hwmon_device in hwmon_devices:

View File

@ -123,7 +123,7 @@ class BBench(Workload):
self.device.write_value('/proc/sys/vm/drop_caches', 3) self.device.write_value('/proc/sys/vm/drop_caches', 3)
#On android 6+ the web browser requires permissions to access the sd card #On android 6+ the web browser requires permissions to access the sd card
if self.device.os_version["sdk"]() >= 23: if self.device.os_version["sdk"] >= 23:
self.device.execute("pm grant com.android.browser android.permission.READ_EXTERNAL_STORAGE") self.device.execute("pm grant com.android.browser android.permission.READ_EXTERNAL_STORAGE")
self.device.execute("pm grant com.android.browser android.permission.WRITE_EXTERNAL_STORAGE") self.device.execute("pm grant com.android.browser android.permission.WRITE_EXTERNAL_STORAGE")

View File

@ -102,7 +102,7 @@ class Vellamo(AndroidUiAutoBenchmark):
filename = None filename = None
if test == "Browser": if test == "Browser":
result_folder = self.device.path.join(context.device_manager.package_data_directory, self.package, 'files') result_folder = self.device.path.join(context.device_manager.package_data_directory, self.package, 'files')
for result_file in self.device.listdir(result_folder, as_root=True): for result_file in self.device.list_directory(result_folder, as_root=True):
if result_file.startswith("Browser"): if result_file.startswith("Browser"):
filename = result_file filename = result_file
else: else: