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
1 file changed