1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +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 '*'
if (not os.listdir(after_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.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:

View File

@ -54,7 +54,6 @@ class StreamlineResourceGetter(ResourceGetter):
priority = GetterPriority.environment + 1 # run before standard enviroment resolvers.
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):
if resource.owner.name != 'streamline':

View File

@ -87,7 +87,7 @@ class ReventGetter(ResourceGetter):
self.resolver.register(self, 'revent', GetterPriority.package)
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'))
for candidate in os.listdir(location):
if candidate.lower() == filename.lower():
@ -137,8 +137,8 @@ class ExecutableGetter(ResourceGetter):
priority = GetterPriority.environment
def get(self, resource, **kwargs):
if settings.binaries_repository:
path = os.path.join(settings.binaries_repository, resource.platform, resource.filename)
if settings.assets_repository:
path = os.path.join(settings.assets_repository, resource.platform, resource.filename)
if os.path.isfile(path):
return path
@ -162,7 +162,7 @@ class EnvironmentExecutableGetter(ExecutableGetter):
paths = [
os.path.join(resource.owner.dependencies_directory, 'bin',
resource.platform, resource.filename),
os.path.join(settings.environment_root, 'bin',
os.path.join(settings.user_directory, 'bin',
resource.platform, resource.filename),
]
for path in paths:
@ -422,7 +422,7 @@ class RemoteFilerGetter(ResourceGetter):
result = None
for entry in os.listdir(remote_path):
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)
if result:
break
@ -454,7 +454,7 @@ class RemoteFilerGetter(ResourceGetter):
if os.path.exists(filepath):
return filepath
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')
# There tends to be some confusion as to where revent files should
# 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):
temprow.append("{0:.3f}".format(temp["cpu{}".format(i)][offline_value]))
writer.writerow(temprow)

View File

@ -52,7 +52,7 @@ def discover_sensors(device, sensor_kinds):
will be returned.
"""
hwmon_devices = device.listdir(HWMON_ROOT)
hwmon_devices = device.list_directory(HWMON_ROOT)
path = device.path
sensors = []
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)
#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.WRITE_EXTERNAL_STORAGE")

View File

@ -102,7 +102,7 @@ class Vellamo(AndroidUiAutoBenchmark):
filename = None
if test == "Browser":
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"):
filename = result_file
else: