mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-29 22:24:51 +00:00
BaseLinuxDevice: Tidied up the way binaries are handled
Added:
get_binary_path: Checks binary_directory for the wanted binary, if
if its not there, it will use which to find a
system one. returns the full path
install_if_needed: will install a binary only if it is not present.
Changes:
- Busybox is now deployed to non-rooted devices
- is_installed has now been removed as the new functions supersede it
- binaries will now always be installed to `binaries_directory` and
not system folders.
- updated workloads to use these new functions
- rt-app and sysbench might still need work
This commit is contained in:
@@ -132,13 +132,13 @@ class Sysbench(Workload):
|
||||
self.device.delete_file(self.results_file)
|
||||
|
||||
def _check_executable(self):
|
||||
self.on_device_binary = self.device.path.join(self.device.binaries_directory, 'sysbench')
|
||||
if self.device.is_installed('sysbench') and not self.force_install:
|
||||
self.logger.debug('sysbench found on device')
|
||||
return
|
||||
if not self.on_host_binary:
|
||||
self.on_device_binary = self.device.get_binary_path("sysbench")
|
||||
if not self.on_device_binary and not self.on_host_binary:
|
||||
raise WorkloadError('sysbench binary is not installed on the device, and it is not found on the host.')
|
||||
self.device.install(self.on_host_binary)
|
||||
if self.force_install:
|
||||
self.device.install(self.on_host_binary)
|
||||
else:
|
||||
self.device.install_if_needed(self.on_host_binary)
|
||||
|
||||
def _build_command(self, **parameters):
|
||||
param_strings = ['--{}={}'.format(k.replace('_', '-'), v)
|
||||
|
||||
Reference in New Issue
Block a user