Created a common_lib host object hierarchy (with site specific override
support) and moved *some* non server specific code from server/hosts to
the common_lib version. Created a client.bin LocalHost host object
inheriting from the common_lib Host and implemented a run() method based
on utils.run() (ie a host object for the local machine). Modified
client/bin/autotest to receive a new --hostname argument to tell it the
hostname to use for the LocalHost.hostname instance attribute and
updated server/autotest.py to send use this argument. Modified
client.bin.job to set a self.host instance attribute with an instance of
LocalHost and updated the unittest. Added an AutotestHostRunError class
(raised on LocalHost.run() failures).
Risk: high (there are modifications in the core server side support code
and some core client code).
Tested with verify/repair and client/server sleeptest jobs.
To be able for SVN to remember code history (that most of the new
client/common_lib/hosts/base_classes.py is based on the old
server/hosts/base_classes.py) then the following steps are probably needed
to apply this patch:
$ svn mkdir client/common_lib/hosts
$ svn copy server/hosts/base_classes.py client/common_lib/hosts
$ patch -p1 ...
$ svn add client/bin/local_host.py client/bin/local_host_unittest.py client/common_lib/hosts/__init__.py client/common_lib/hosts/base_classes_unittest.py
Signed-off-by: Mihai Rusu <dizzy@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3594 592f7852-d20e-0410-864c-8624ca9c26a4
11 files changed