diff --git a/wlauto/instrumentation/misc/__init__.py b/wlauto/instrumentation/misc/__init__.py index e8ed6643..86c880fd 100644 --- a/wlauto/instrumentation/misc/__init__.py +++ b/wlauto/instrumentation/misc/__init__.py @@ -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: diff --git a/wlauto/instrumentation/streamline/__init__.py b/wlauto/instrumentation/streamline/__init__.py index c97c09f9..cfd2614a 100644 --- a/wlauto/instrumentation/streamline/__init__.py +++ b/wlauto/instrumentation/streamline/__init__.py @@ -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': diff --git a/wlauto/resource_getters/standard.py b/wlauto/resource_getters/standard.py index 2b704f1d..bbedaf52 100644 --- a/wlauto/resource_getters/standard.py +++ b/wlauto/resource_getters/standard.py @@ -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 diff --git a/wlauto/result_processors/dvfs.py b/wlauto/result_processors/dvfs.py index d2a71171..654c2b34 100644 --- a/wlauto/result_processors/dvfs.py +++ b/wlauto/result_processors/dvfs.py @@ -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) - diff --git a/wlauto/utils/hwmon.py b/wlauto/utils/hwmon.py index 90998ab3..9375497d 100644 --- a/wlauto/utils/hwmon.py +++ b/wlauto/utils/hwmon.py @@ -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: diff --git a/wlauto/workloads/bbench/__init__.py b/wlauto/workloads/bbench/__init__.py index 0652a669..08262ea0 100644 --- a/wlauto/workloads/bbench/__init__.py +++ b/wlauto/workloads/bbench/__init__.py @@ -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") diff --git a/wlauto/workloads/vellamo/__init__.py b/wlauto/workloads/vellamo/__init__.py index a713e4dc..9abcd4a4 100644 --- a/wlauto/workloads/vellamo/__init__.py +++ b/wlauto/workloads/vellamo/__init__.py @@ -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: