am 402009e4: Merge "Improvements to suspend state detection; code cleanups and documentation. - Added additional functions computeBaselineState() and getBaselineState() for detecting baseline state (improved the tests and estimating average) - Added functions isApInSu
* commit '402009e416c53076e78f579e8bcb683dcdfaf3a5':
Improvements to suspend state detection; code cleanups and documentation. - Added additional functions computeBaselineState() and getBaselineState() for detecting baseline state (improved the tests and estimating average) - Added functions isApInSuspendState(), waitForApSuspendMode() to improve the criteria to detect AP off state - Modified run_tests() to avoid computing a new baseline power for each test. The baseline power is measured once and then used for each test to determine the delta current draw. - Removed waitForScreenOff() function - Added endTestsBecauseConnectionToDeviceLost() function - Added a flag "--max_baseline_amps" of type float to specify the max expected baseline amps for the device being tested - Tested this on Shamu and HH, and the power tests run until the end and PASS everything - several docstring comments added to functions, code cleanups, variable renaming for better description - Added a PowerTestException class Change-Id: I7190009882cc2d77d20138f10d4659ea1f39611d