1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00

ResourceGetters: Updated executable discovery to use http_getter

Executables were not previously automatically downloaded from a
provided remote_assets_url. The http_getter is now called to attempt to
find and download executable files.
This commit is contained in:
Marc Bonnici 2016-11-16 12:42:24 +00:00
parent 40d281b336
commit c93cc81aac

View File

@ -345,7 +345,7 @@ class HttpGetter(ResourceGetter):
"""
priority = GetterPriority.remote
resource_type = ['apk', 'file', 'jar', 'revent']
resource_type = ['apk', 'file', 'jar', 'revent', 'executable']
parameters = [
Parameter('url', global_alias='remote_assets_url',
@ -441,6 +441,12 @@ class HttpGetter(ResourceGetter):
return asset
except ValueError as e:
self.logger.warning(e.message)
elif resource.name == 'executable':
platform = resource.platform
path = '/'.join(['bin', platform, resource.filename])
for asset in assets:
if asset['path'].lower() == path.lower():
return asset
else: # file
for asset in assets:
if asset['path'].lower() == resource.path.lower():