mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +00:00
AndroidDevice: write "dumpsys window" output on host
On Android targets, WA collects device display information by running "dumpsys window" during run initialisation. Previously, this was redirectied into on-device file (under the working directory) and then pulled from the target. It looks like on Android-on-ChromeOS devices the redirect leads to an "Unknown Error" and the resulting file is empty. To get around that, this commit modfies the dumpsys command so that the output is collected directly from the shell's stdout and then writen on the host.
This commit is contained in:
parent
60f52c2187
commit
490dd404ae
@ -550,11 +550,10 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
|
||||
props['android_id'] = self.get_android_id()
|
||||
self._update_build_properties(props)
|
||||
|
||||
dumpsys_target_file = self.path.join(self.working_directory, 'window.dumpsys')
|
||||
dumpsys_host_file = os.path.join(context.host_working_directory, 'window.dumpsys')
|
||||
self.execute('{} > {}'.format('dumpsys window', dumpsys_target_file))
|
||||
self.pull_file(dumpsys_target_file, dumpsys_host_file)
|
||||
context.add_run_artifact('dumpsys_window', dumpsys_host_file, 'meta')
|
||||
with open(dumpsys_host_file, 'w') as wfh:
|
||||
wfh.write(self.execute('dumpsys window'))
|
||||
context.add_run_artifact('dumpsys_window', dumpsys_host_file, 'meta')
|
||||
|
||||
prop_file = os.path.join(context.host_working_directory, 'android-props.json')
|
||||
with open(prop_file, 'w') as wfh:
|
||||
|
Loading…
x
Reference in New Issue
Block a user