FAFT: Implement basic methods of ModeSwitcher for Ryu
This ModeSwitcher does some basic methods, like waiting DUT online/offline.
More changes will be added to support the rest.
BUG=chromium:527484
TEST=Ran some FAFT tests on Ryu.
Change-Id: I085ae9ed9c8fec5b773e3f9c6d6506bc008de5ba
Reviewed-on: https://chromium-review.googlesource.com/294774
Commit-Ready: Wai-Hong Tam <waihong@chromium.org>
Tested-by: Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>
diff --git a/client/cros/faft/rpc_functions.py b/client/cros/faft/rpc_functions.py
index 64332b1..caeaca8 100755
--- a/client/cros/faft/rpc_functions.py
+++ b/client/cros/faft/rpc_functions.py
@@ -179,6 +179,23 @@
"""
return True
+ def _system_wait_for_client(self, timeout):
+ """Wait for the client to come back online.
+
+ @param timeout: Time in seconds to wait for the client SSH daemon to
+ come up.
+ @return: True if succeed; otherwise False.
+ """
+ return self._os_if.wait_for_device(timeout)
+
+ def _system_wait_for_client_offline(self, timeout):
+ """Wait for the client to come offline.
+
+ @param timeout: Time in seconds to wait the client to come offline.
+ @return: True if succeed; otherwise False.
+ """
+ return self._os_if.wait_for_no_device(timeout)
+
def _system_dump_log(self, remove_log=False):
"""Dump the log file.