Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Bug 809012 - panda boards do not reboot when the sutagent is in a hun…
Browse files Browse the repository at this point in the history
…g state. r=Callek
  • Loading branch information
jmaher committed Nov 7, 2012
1 parent 927f0d1 commit 3d7cde6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions sut_tools/reboot.py
Expand Up @@ -18,17 +18,23 @@ def reboot(dm):

try:
dm.getInfo('process')
log.info(dm._runCmds([{'cmd': 'exec su -c "logcat -d -v time *:W"'}]))
log.info(dm._runCmds([{'cmd': 'exec su -c "logcat -d -v time *:W"'}], timeout=10))
except:
log.info("Failure to trying to run logcat on device")

try:
log.info('forcing device reboot')
status = soft_reboot(dm=dm, device=deviceName, ipAddr=proxyIP, port=proxyPort)
log.info(status)
finally:
try:
waitForDevice(dm, waitTime=300)
except SystemExit:
setFlag(errorFile, "Remote Device Error: call for device reboot failed")
return 1
except:
log.info("Failure while rebooting device")


try:
waitForDevice(dm, waitTime=300)
except SystemExit:
setFlag(errorFile, "Remote Device Error: Device failed to recover after reboot")
return 1

sys.stdout.flush()
return 0
Expand Down

0 comments on commit 3d7cde6

Please sign in to comment.