added a new method to sshhost.
From: raphtee@google.com
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1409 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/ssh_host.py b/server/hosts/ssh_host.py
index a9f1297..45fedb6 100644
--- a/server/hosts/ssh_host.py
+++ b/server/hosts/ssh_host.py
@@ -20,10 +20,10 @@
import types, os, sys, signal, subprocess, time, re, socket
import base_classes, utils, bootloader
-
from common.error import *
+
class SSHHost(base_classes.RemoteHost):
"""
This class represents a remote machine controlled through an ssh
@@ -332,6 +332,19 @@
return result
+ def run_short(self, command, **kwargs):
+ """
+ Calls the run() command with a short default timeout.
+
+ Args:
+ Takes the same arguments as does run(),
+ with the exception of the timeout argument which
+ here is fixed at 60 seconds.
+ It returns the result of run.
+ """
+ return self.run(command, timeout=60, **kwargs)
+
+
def run_grep(self, command, timeout=30, ignore_status=False,
stdout_ok_regexp=None, stdout_err_regexp=None,
stderr_ok_regexp=None, stderr_err_regexp=None,