mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
common/linux/device.py: Create binaries_directory path if it doesn't exist
Some Linux devices may run on minimal root file systems (e.g. buildroot) where /usr/local/bin path doesn't exist. Create the binaries_directory if it doesn't exist instead of letting WA quit and return errors such as: INFO Runner: Skipping the rest of the iterations for this spec. ERROR Runner: Error while running memcpy ERROR Runner: CalledProcessError("Command 'sshpass -p '<password>' /usr/bin/scp -r /usr/local/lib/python2.7/dist-packages/ wlauto-2.3.0-py2.7.egg/wlauto/workloads/memcpy /memcpy root@192.168.x.x:/usr/local/bin/memcpy' returned non-zero exit status 1") ERROR Runner: Got: ERROR Runner: ERROR Runner: scp: /usr/local/bin/memcpy: No such file or directory Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
This commit is contained in:
parent
925c354551
commit
a7895a17bf
@ -804,7 +804,9 @@ class LinuxDevice(BaseLinuxDevice):
|
||||
|
||||
def initialize(self, context, *args, **kwargs):
|
||||
self.execute('mkdir -p {}'.format(self.local_binaries_directory))
|
||||
self.execute('mkdir -p {}'.format(self.binaries_directory))
|
||||
self.execute('export PATH={}:$PATH'.format(self.local_binaries_directory))
|
||||
self.execute('export PATH={}:$PATH'.format(self.binaries_directory))
|
||||
super(LinuxDevice, self).initialize(context, *args, **kwargs)
|
||||
|
||||
# Power control
|
||||
@ -938,8 +940,12 @@ class LinuxDevice(BaseLinuxDevice):
|
||||
install_executable = install # compatibility
|
||||
|
||||
def uninstall(self, name):
|
||||
path = self.path.join(self.local_binaries_directory, name)
|
||||
self.delete_file(path)
|
||||
if self.is_rooted:
|
||||
path = self.path.join(self.binaries_directory, name)
|
||||
self.delete_file(path, as_root=True)
|
||||
else:
|
||||
path = self.path.join(self.local_binaries_directory, name)
|
||||
self.delete_file(path)
|
||||
|
||||
uninstall_executable = uninstall # compatibility
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user