1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +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:
Sascha Bischoff 2015-11-10 13:28:25 +00:00
parent 95f17702d7
commit 672c74c76c

View File

@ -566,21 +566,9 @@ class Gem5Device(AndroidDevice):
# it quietly (not as an error/warning) and move on.
self.logger.debug('Could not pull property file "{}"'.format(propfile))
# This is duplicated from the AndroidDevice class, as we want to run
# this code without executing the BaseLinuxDevice implementation
props = {}
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
# As we do not call the super class, we explicitly need to
# process the Android properties.
props = self._get_android_properties(context)
def get_directory(self, context, directory):
""" Pull a directory from the device """