Permalink
Browse files

Bug 809012 - panda boards do not reboot when the sutagent is in a hun…

…g state. r=Callek
  • Loading branch information...
1 parent 927f0d1 commit 3d7cde6eff07b7660df040748e577fa2acdb1159 @jmaher jmaher committed Nov 7, 2012
Showing with 13 additions and 7 deletions.
  1. +13 −7 sut_tools/reboot.py
View
20 sut_tools/reboot.py
@@ -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

0 comments on commit 3d7cde6

Please sign in to comment.