allow testing with offline remote hosts

Useful for tests that do not require SSH access, such as those that use
servo for initializing the DUT. An SSH initialization is still
attempted, but is not required to succeed if --allow_offline_remote is

TEST=Test continues in the presence of SSH connection timeout

Change-Id: I632bbb6fc37b9e9692c7bdac0fd986e22ab240c5
Reviewed-by: Richard Barnette <>
Reviewed-by: Chris Sosa <>
Commit-Ready: Gilad Arnold <>
Tested-by: Gilad Arnold <>
diff --git a/ b/
index 7410ee1..2865b0a 100755
--- a/
+++ b/
@@ -35,6 +35,8 @@
 DEFINE_integer verbose 1 "{0,1,2} Max verbosity shows autoserv debug output." v
 DEFINE_boolean whitelist_chrome_crashes ${FLAGS_FALSE} \
     "Treat Chrome crashes as non-fatal."
+DEFINE_boolean allow_offline_remote ${FLAGS_FALSE} \
+    "Proceed with testing even if remote is offline; useful when using servo"
 # The prefix to look for in an argument that determines we're talking about a
 # new-style suite.
@@ -355,7 +357,7 @@
   trap cleanup EXIT
-  remote_access_init
+  remote_access_init || [ ${FLAGS_allow_offline_remote} -eq ${FLAGS_TRUE} ]
   # autotest requires that an ssh-agent already be running
   start_ssh_agent >/dev/null