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

framework/workload: Fix incorrect regex matching apk filepath

On some devices an installed apk filepath can contain an '=' character
which was previously used to end the regex match. Now match with the
package name as well to ensure the file path is extracted correctly.
This commit is contained in:
Marc Bonnici 2018-01-09 10:16:36 +00:00 committed by setrofim
parent d4f78afc30
commit 51794c99e9

View File

@ -765,7 +765,7 @@ class PackageHandler(object):
message = 'Cannot retrieve "{}" as not installed on Target'
raise WorkloadError(message.format(package))
package_info = self.target.execute('pm list packages -f {}'.format(package))
apk_path = re.match('package:(.*)=', package_info).group(1)
apk_path = re.match('package:(.*)={}'.format(package), package_info).group(1)
self.target.pull(apk_path, self.owner.dependencies_directory)
def teardown(self):