mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-07 13:41:24 +00:00
Gem5Device: Avoid duplicate get_properties code
- Remove the duplicated get_properties code by calling the internal _get_android_properties method directly.
This commit is contained in:
parent
95f17702d7
commit
672c74c76c
@ -566,21 +566,9 @@ class Gem5Device(AndroidDevice):
|
|||||||
# it quietly (not as an error/warning) and move on.
|
# it quietly (not as an error/warning) and move on.
|
||||||
self.logger.debug('Could not pull property file "{}"'.format(propfile))
|
self.logger.debug('Could not pull property file "{}"'.format(propfile))
|
||||||
|
|
||||||
# This is duplicated from the AndroidDevice class, as we want to run
|
# As we do not call the super class, we explicitly need to
|
||||||
# this code without executing the BaseLinuxDevice implementation
|
# process the Android properties.
|
||||||
props = {}
|
props = self._get_android_properties(context)
|
||||||
props['android_id'] = self.get_android_id()
|
|
||||||
buildprop_file = os.path.join(context.host_working_directory, 'build.prop')
|
|
||||||
if not os.path.isfile(buildprop_file):
|
|
||||||
self.pull_file('/system/build.prop', context.host_working_directory)
|
|
||||||
self._update_build_properties(buildprop_file, props)
|
|
||||||
context.add_run_artifact('build_properties', buildprop_file, 'export')
|
|
||||||
|
|
||||||
dumpsys_window_file = os.path.join(context.host_working_directory, 'window.dumpsys')
|
|
||||||
self.execute('{} > {}'.format('dumpsys window', 'window.dumpsys'))
|
|
||||||
self.pull_file('window.dumpsys', dumpsys_window_file)
|
|
||||||
context.add_run_artifact('dumpsys_window', dumpsys_window_file, 'meta')
|
|
||||||
return props
|
|
||||||
|
|
||||||
def get_directory(self, context, directory):
|
def get_directory(self, context, directory):
|
||||||
""" Pull a directory from the device """
|
""" Pull a directory from the device """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user