Remove prebuild feature from server.
This feature was turned off in the global config in 2011 and doesn't
appear to have been used since.
BUG=None
TEST=None
Change-Id: I1b2d56b5c1cc11633f615070bcbe41c9ef188fcb
Reviewed-on: https://chromium-review.googlesource.com/579650
Commit-Ready: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
diff --git a/global_config.ini b/global_config.ini
index 5c0420c..a8a1b3e 100644
--- a/global_config.ini
+++ b/global_config.ini
@@ -256,7 +256,6 @@
# Set to True to take advantage of OpenSSH-based connection sharing. This would
# have bigger performance impact when ssh_engine is 'raw_ssh'.
enable_master_ssh: True
-enable_server_prebuild: False
[PACKAGES]
# in days
diff --git a/server/autotest.py b/server/autotest.py
index ff4c687..771a6bd 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -19,7 +19,6 @@
from autotest_lib.client.common_lib import global_config
from autotest_lib.client.common_lib import utils as client_utils
from autotest_lib.server import installable_object
-from autotest_lib.server import prebuild
from autotest_lib.server import utils
try:
@@ -32,9 +31,6 @@
AUTOTEST_HTTP = 'http://test.kernel.org/svn/autotest/trunk/client'
CONFIG = global_config.global_config
-AUTOSERV_PREBUILD = CONFIG.get_config_value(
- 'AUTOSERV', 'enable_server_prebuild', type=bool, default=False)
-
ENABLE_RESULT_THROTTLING = CONFIG.get_config_value(
'AUTOSERV', 'enable_result_throttling', type=bool, default=False)
@@ -1101,13 +1097,9 @@
src_dir = os.path.join(self.job.clientdir, test_dir, name)
if os.path.exists(src_dir):
src_dirs += [src_dir]
- if AUTOSERV_PREBUILD:
- prebuild.setup(self.job.clientdir, src_dir)
break
elif pkg_type == 'profiler':
src_dirs += [os.path.join(self.job.clientdir, 'profilers', name)]
- if AUTOSERV_PREBUILD:
- prebuild.setup(self.job.clientdir, src_dir)
elif pkg_type == 'dep':
src_dirs += [os.path.join(self.job.clientdir, 'deps', name)]
elif pkg_type == 'client':
diff --git a/server/prebuild.py b/server/prebuild.py
deleted file mode 100644
index b13fd7b..0000000
--- a/server/prebuild.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 2010 Google Inc. Released under the GPL v2
-#
-# Eric Li <ericli@google.com>
-
-import logging, os, pickle, re, sys
-import common
-from autotest_lib.client.bin import setup_job as client_setup_job
-
-
-def touch_init(parent_dir, child_dir):
- """
- Touch __init__.py file all alone through from dir_patent to child_dir.
-
- So client tests could be loaded as Python modules. Assume child_dir is a
- subdirectory of parent_dir.
- """
-
- if not child_dir.startswith(parent_dir):
- logging.error('%s is not a subdirectory of %s' % (child_dir,
- parent_dir))
- return
- sub_parent_dirs = parent_dir.split(os.path.sep)
- sub_child_dirs = child_dir.split(os.path.sep)
- for sub_dir in sub_child_dirs[len(sub_parent_dirs):]:
- sub_parent_dirs.append(sub_dir)
- path = os.path.sep.join(sub_parent_dirs)
- init_py = os.path.join(path, '__init__.py')
- open(init_py, 'a').close()
-
-
-def init_test(testdir):
- """
- Instantiate a client test object from a given test directory.
-
- @param testdir The test directory.
- @returns A test object or None if failed to instantiate.
- """
-
- class options:
- tag = ''
- verbose = None
- cont = False
- harness = 'autoserv'
- hostname = None
- user = None
- log = True
- return client_setup_job.init_test(options, testdir)
-
-
-def setup(autotest_client_dir, client_test_dir):
- """
- Setup prebuild of a client test.
-
- @param autotest_client_dir: The autotest/client base directory.
- @param client_test_dir: The actual test directory under client.
- """
-
- os.environ['AUTODIR'] = autotest_client_dir
- touch_init(autotest_client_dir, client_test_dir)
-
- # instantiate a client_test instance.
- client_test = init_test(client_test_dir)
- client_setup_job.setup_test(client_test)