1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

Merge pull request #297 from marcbonnici/octaned

ResourceGetters: Updated executable discovery to use http_getter
This commit is contained in:
setrofim 2016-11-28 11:45:46 +00:00 committed by GitHub
commit d16d8bf62d

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():