FAFT: Speed up to skip the dev screen when switching WP status
When switching the WP status, it has to reboot DUT. It causes a 30s
waiting time for the dev screen timeout when DUT is under dev mode.
This CL forces to press Ctrl-D to skip the dev screen. Note that it
still presses Ctrl-D under normal mode but it doesn't hurt.
This CL also removes the unused libraries.
BUG=chromium-os:34392
TEST=First ran firmware_TryFwB/control.dev which makes DUT to dev mode.
Then ran firmware_TryFwB/control.ec_wp which switches WP status. Saw it
skip the dev screen quickly.
Change-Id: I27fb8228036aed8526d5d842fde27d4b8c93ac6c
Reviewed-on: https://gerrit.chromium.org/gerrit/41516
Reviewed-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Yusuf Mohsinally <mohsinally@google.com>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index 8d1411f..b963d81 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -7,7 +7,6 @@
import os
import re
import subprocess
-import sys
import time
from autotest_lib.client.bin import utils
@@ -19,8 +18,6 @@
from autotest_lib.server.cros.faft_delay_constants import FAFTDelayConstants
from autotest_lib.server.cros.servo_test import ServoTest
from autotest_lib.server import hosts
-from autotest_lib.site_utils import lab_test
-from autotest_lib.site_utils.chromeos_test.common_util import ChromeOSTestError
class FAFTSequence(ServoTest):
"""
@@ -780,7 +777,8 @@
logging.info('The test required EC is %swrite-protected. Reboot '
'and flip the state.', '' if ec_wp else 'not ')
self.run_faft_step({
- 'reboot_action': (self.set_ec_write_protect_and_reboot, ec_wp)
+ 'reboot_action': (self.set_ec_write_protect_and_reboot, ec_wp),
+ 'firmware_action': self.wait_dev_screen_and_ctrl_d,
})
@@ -793,7 +791,8 @@
logging.info('Restore the original EC write protection and reboot.')
self.run_faft_step({
'reboot_action': (self.set_ec_write_protect_and_reboot,
- self._old_ec_wp)
+ self._old_ec_wp),
+ 'firmware_action': self.wait_dev_screen_and_ctrl_d,
})