I need to be able to run many autotest instances on one machine and
I need to be able to have these tests run for an indeterminite amount
of time.
From: Jeremy Orlow <jorlow@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1103 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autotest.py b/server/autotest.py
index 682aa3d..f4c6c58 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -455,6 +455,9 @@
def _get_autodir(host):
+ dir = host.get_autodir()
+ if dir:
+ return dir
try:
# There's no clean way to do this. readlink may not exist
cmd = "python -c 'import os,sys; print os.readlink(sys.argv[1])' /etc/autotest.conf"
diff --git a/server/hosts/base_classes.py b/server/hosts/base_classes.py
index 4669dee..3906dd8 100644
--- a/server/hosts/base_classes.py
+++ b/server/hosts/base_classes.py
@@ -91,6 +91,9 @@
def get_crashdumps(self, test_start_time):
pass
+ def get_autodir(self):
+ return None
+
# site_host.py may be non-existant or empty, make sure that an appropriate
# SiteHost class is created nevertheless
diff --git a/server/hosts/ssh_host.py b/server/hosts/ssh_host.py
index 298b216..70f1255 100644
--- a/server/hosts/ssh_host.py
+++ b/server/hosts/ssh_host.py
@@ -52,7 +52,7 @@
def __init__(self, hostname, user="root", port=22, initialize=True,
conmux_log="console.log", conmux_warnings="status.log",
conmux_server=None, conmux_attach=None,
- netconsole_log=None, netconsole_port=6666):
+ netconsole_log=None, netconsole_port=6666, autodir=None):
"""
Construct a SSHHost object
@@ -67,6 +67,7 @@
self.port= port
self.tmp_dirs= []
self.initialize = initialize
+ self.autodir = autodir
super(SSHHost, self).__init__()
@@ -657,3 +658,7 @@
def ssh_ping(self, timeout = 60):
self.run('true', connect_timeout = timeout)
+
+
+ def get_autodir(self):
+ return self.autodir