1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 20:38:57 +00:00

Merge pull request #436 from setrofim/master

utils/android: better error massage when no exit code found
This commit is contained in:
setrofim 2017-07-12 13:36:09 +01:00 committed by GitHub
commit 665d76456b

View File

@ -367,7 +367,10 @@ def adb_shell(device, command, timeout=None, check_exit_code=False, as_root=Fals
message += '\n{}'.format(am_start_error.findall(output)[0])
raise DeviceError(message)
else:
raise DeviceError('adb has returned early; did not get an exit code. Was kill-server invoked?')
message = 'adb has returned early; did not get an exit code. '\
'Was kill-server invoked?\nOUTPUT:\n-----\n{}\n'\
'-----ERROR:\n-----\n{}\n-----'
raise DeviceError(message.format(raw_output, error))
else: # do not check exit code
try:
output, error = check_output(full_command, timeout, shell=True)