mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
fw/getters: update Executable resolution
Use Executable.match() rather than just checking the path inside get_from_location(); this allows for alternative matching semantics (e.g. globbing) inside derived implementations.
This commit is contained in:
parent
05857ec2bc
commit
24a4a032db
@ -84,9 +84,13 @@ def get_from_location(basepath, resource):
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
elif resource.kind == 'executable':
|
||||
path = os.path.join(basepath, 'bin', resource.abi, resource.filename)
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
bin_dir = os.path.join(basepath, 'bin', resource.abi)
|
||||
if not os.path.exists(bin_dir):
|
||||
return None
|
||||
for entry in os.listdir(bin_dir):
|
||||
path = os.path.join(bin_dir, entry)
|
||||
if resource.match(path):
|
||||
return path
|
||||
elif resource.kind == 'revent':
|
||||
path = os.path.join(basepath, 'revent_files')
|
||||
if os.path.exists(path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user