1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-04 04:12:42 +01: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:
Sebastian Goscik
2016-01-14 16:56:57 +00:00
parent 75ce620e6b
commit 7c35c604f4
12 changed files with 125 additions and 92 deletions

View File

@@ -216,14 +216,13 @@ class RtApp(Workload):
def _deploy_rt_app_binary_if_necessary(self):
# called from initialize() so gets invoked once per run
if self.force_install or not self.device.is_installed(BINARY_NAME):
RtApp.device_binary = self.device.get_binary_path("rt-app")
if self.force_install or not RtApp.device_binary:
if not self.host_binary:
message = '''rt-app is not installed on the device and could not be
found in workload resources'''
raise ResourceError(message)
RtApp.device_binary = self.device.install(self.host_binary)
else:
RtApp.device_binary = BINARY_NAME
def _load_json_config(self, context):
user_config_file = self._get_raw_json_config(context.resolver)
@@ -280,4 +279,3 @@ class RtApp(Workload):
tf.extractall(context.output_directory)
os.remove(host_path)
self.device.execute('rm -rf {}/*'.format(self.device_working_directory))