summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-08-24 22:08:31 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-08-24 22:08:31 +0000
commitf6d1af00097a501c16bb55df5826c8177871ed64 (patch)
tree4e8d567c7a518c90e46d3582fa2396f0089e3496
parentd2ace1ee8e0d2bb79c01765c02535d518d7d7bd5 (diff)
Sadly, put back the "disable packaging-only installs" used by the
profiler installs. We can't count on profilers using autoserv-based packaging because the profiler runs are background jobs, and so don't actually use autoserv. I think this code can ultimately but cleaned up but for now it's better to revert back to the old model of doing "full" installs when profiling is running on a setup without any http repositories. Risk: Low Visibility: Restores server-side profilers in no-repos configs. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3609 592f7852-d20e-0410-864c-8624ca9c26a4
-rw-r--r--client/common_lib/profiler_manager.py2
-rw-r--r--server/autotest.py31
-rw-r--r--server/profiler.py2
3 files changed, 22 insertions, 13 deletions
diff --git a/client/common_lib/profiler_manager.py b/client/common_lib/profiler_manager.py
index 40c9d85b..b51c7309 100644
--- a/client/common_lib/profiler_manager.py
+++ b/client/common_lib/profiler_manager.py
@@ -7,7 +7,7 @@ from autotest_lib.client.common_lib import error, utils, packages
class ProfilerNotPresentError(error.JobError):
def __init__(self, name, *args, **dargs):
msg = "%s not present" % name
- error.JobError.__init__(msg, *args, **dargs)
+ error.JobError.__init__(self, msg, *args, **dargs)
class profiler_manager(object):
diff --git a/server/autotest.py b/server/autotest.py
index 5619ec1d..a2d8abeb 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -65,19 +65,24 @@ class BaseAutotest(installable_object.InstallableObject):
self._install(host=host, autodir=autodir)
- def _install(self, host=None, autodir=None):
+ def install_no_autoserv(self, host=None, autodir=None):
+ self._install(host=host, autodir=autodir, no_autoserv=True)
+
+
+ def _install(self, host=None, autodir=None, no_autoserv=True):
"""
Install autotest. If get() was not called previously, an
attempt will be made to install from the autotest svn
repository.
- Args:
- host: a Host instance on which autotest will be installed
- autodir: location on the remote host to install to
+ @param host A Host instance on which autotest will be installed
+ @param autodir Location on the remote host to install to
+ @param autoserv Disable install modes that depend on the client
+ running with the autoserv harness
- Raises:
- AutoservError: if a tarball was not specified and
- the target host does not have svn installed in its path"""
+ @exception AutoservError if a tarball was not specified and
+ the target host does not have svn installed in its path
+ """
if not host:
host = self.host
if not self.got:
@@ -130,9 +135,13 @@ class BaseAutotest(installable_object.InstallableObject):
supports_autoserv_packaging = c.get_config_value(
"PACKAGES", "serve_packages_from_autoserv", type=bool)
# Copy autotest recursively
- if supports_autoserv_packaging:
- dirs_to_exclude = set(["tests", "site_tests", "deps",
- "profilers"])
+ if supports_autoserv_packaging and not no_autoserv:
+ dirs_to_exclude = set(["tests", "site_tests", "deps"])
+ profiler_dir = os.path.join(self.source_material,
+ "profilers")
+ for f in os.listdir(profiler_dir):
+ if os.path.isdir(os.path.join(profiler_dir, f)):
+ dirs_to_exclude.add(f)
light_files = [os.path.join(self.source_material, f)
for f in os.listdir(self.source_material)
if f not in dirs_to_exclude]
@@ -881,7 +890,7 @@ class client_logger(object):
temp_dir = autotemp.tempdir(unique_id='autoserv-packager',
dir=self.job.tmpdir)
tarball_path = self.job.pkgmgr.tar_package(
- pkg_name, src_dir, temp_dir.name, ' .')
+ pkg_name, src_dir, temp_dir.name, " .")
self.host.send_file(tarball_path, remote_dest)
finally:
temp_dir.clean()
diff --git a/server/profiler.py b/server/profiler.py
index 0e278feb..998ac264 100644
--- a/server/profiler.py
+++ b/server/profiler.py
@@ -113,7 +113,7 @@ class profiler_proxy(object):
host = hosts.create_host(hostname, auto_monitor=False)
tmp_dir = host.get_tmp_dir(parent=PROFILER_TMPDIR)
at = autotest.Autotest(host)
- at.install(autodir=tmp_dir)
+ at.install_no_autoserv(autodir=tmp_dir)
self.installed_hosts[host] = (at, tmp_dir)
# drop any installs from hosts no longer in job.hosts