autotest: Find special cases detected by pwr_button
BUG=b:163845694
TEST=run local repair to be sure nothing broken
./server/autoserv -s --host-info-subdir host_info_store -m chromeos1-row4-rack4-host3 --lab True --local-only-host-info True -R -r /tr/
Change-Id: I578e8975fe9c5de5004406329c21ff8a35ffc393
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2556901
Commit-Queue: Otabek Kasimov <otabek@google.com>
Tested-by: Otabek Kasimov <otabek@google.com>
Reviewed-by: Garry Wang <xianuowang@chromium.org>
diff --git a/server/hosts/servo_host.py b/server/hosts/servo_host.py
index 0e35dda..fac2990 100644
--- a/server/hosts/servo_host.py
+++ b/server/hosts/servo_host.py
@@ -1395,12 +1395,13 @@
if (dut_connected == hosts.VERIFY_FAILED
or hub_connected == hosts.VERIFY_FAILED):
- if pwr_button == hosts.VERIFY_SUCCESS:
- # unexpected case
- metrics.Counter(
- 'chromeos/autotest/repair/servo_unexpected/pwr_button'
- ).increment(fields=self._get_host_metrics_data())
return servo_constants.SERVO_STATE_DUT_NOT_CONNECTED
+ # TODO(otabek@): detect special cases detected by pwr_button
+ if dut_connected == hosts.VERIFY_SUCCESS:
+ if pwr_button == hosts.VERIFY_FAILED:
+ metrics.Counter(
+ 'chromeos/autotest/repair/servo_unexpected/pwr_button2'
+ ).increment(fields=self._get_host_metrics_data())
if start_servod == hosts.VERIFY_FAILED:
return servo_constants.SERVO_STATE_SERVOD_ISSUE