mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	Implement caching of ApkInfo
Allow caching of ApkInfo to prevent the requirement of re-parsing of APK files.
This commit is contained in:
		| @@ -32,16 +32,16 @@ import tarfile | ||||
| from subprocess import CalledProcessError | ||||
|  | ||||
| from devlib.exception import TargetError | ||||
| from devlib.utils.android import ApkInfo | ||||
|  | ||||
| from wa import Instrument, Parameter, very_fast | ||||
| from wa.framework.exception import ConfigError | ||||
| from wa.framework.instrument import slow | ||||
| from wa.utils.diff import diff_sysfs_dirs, diff_interrupt_files | ||||
| from wa.utils.misc import as_relative, lock_file | ||||
| from wa.utils.misc import as_relative | ||||
| from wa.utils.misc import ensure_file_directory_exists as _f | ||||
| from wa.utils.misc import ensure_directory_exists as _d | ||||
| from wa.utils.types import list_of_strings | ||||
| from wa.utils.android import get_cacheable_apk_info | ||||
|  | ||||
|  | ||||
| logger = logging.getLogger(__name__) | ||||
| @@ -244,8 +244,7 @@ class ApkVersion(Instrument): | ||||
|  | ||||
|     def setup(self, context): | ||||
|         if hasattr(context.workload, 'apk_file'): | ||||
|             with lock_file(context.workload.apk_file): | ||||
|                 self.apk_info = ApkInfo(context.workload.apk_file) | ||||
|             self.apk_info = get_cacheable_apk_info(context.workload.apk_file) | ||||
|         else: | ||||
|             self.apk_info = None | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user