diff options
author | mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> | 2009-08-24 22:08:31 +0000 |
---|---|---|
committer | mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> | 2009-08-24 22:08:31 +0000 |
commit | f6d1af00097a501c16bb55df5826c8177871ed64 (patch) | |
tree | 4e8d567c7a518c90e46d3582fa2396f0089e3496 /server | |
parent | d2ace1ee8e0d2bb79c01765c02535d518d7d7bd5 (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
Diffstat (limited to 'server')
-rw-r--r-- | server/autotest.py | 31 | ||||
-rw-r--r-- | server/profiler.py | 2 |
2 files changed, 21 insertions, 12 deletions
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 |