Adjust infra_ServoDiagnosis to account for chromeboxes.
Because of a recent change, devices without a lid (i.e. chromeboxes)
now report lid_open:not_applicable for their lid status. This
change accounts for that change to allow distinguishing "lid stuck
closed" from "device has no lid" in infra_ServoDiagnosis.
BUG=None
TEST=None
Change-Id: I84b4e1156d5260a053290128e0b0cc63376b34dc
Reviewed-on: https://chromium-review.googlesource.com/217409
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
diff --git a/server/site_tests/infra_ServoDiagnosis/infra_ServoDiagnosis.py b/server/site_tests/infra_ServoDiagnosis/infra_ServoDiagnosis.py
index c786ffd..449123f 100644
--- a/server/site_tests/infra_ServoDiagnosis/infra_ServoDiagnosis.py
+++ b/server/site_tests/infra_ServoDiagnosis/infra_ServoDiagnosis.py
@@ -135,9 +135,11 @@
def _lid_test(servo_host, servod):
"""Test whether the 'lid_open' signal is correct.
- This tests whether the state of the 'lid_open' signal is
- 'yes'. There is a manual switch on the servo board; if that
- switch is set wrong, the signal will be stuck at 'no'.
+ This tests whether the state of the 'lid_open' signal has a
+ correct value. There is a manual switch on the servo board; if
+ that switch is set wrong, the signal will be stuck at 'no'.
+ Working units may return a setting of 'yes' (meaning the lid is
+ open) or 'not_applicable' (meaning the device has no lid).
Pre-requisite: This test depends on the 'pwr_button' test.
@@ -149,7 +151,7 @@
@param servod The Servo object to be tested.
"""
- return servod.get('lid_open') == 'yes'
+ return servod.get('lid_open') != 'no'
def _command_test(servo_host, command):