diff --git a/CODING_STYLE b/CODING_STYLE index b1ca5f5102..0c8865c1d6 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -87,7 +87,7 @@ import sys, time, urllib, urlparse try: import autotest.common except ImportError: - import common # Magic autotest_lib module and sys.path setup code. + import common # Magic autotest module and sys.path setup code. import MySQLdb # After common so that we check our site-packages first. from common_lib import error diff --git a/cli/acl.py b/cli/acl.py index c101666e52..e43d056634 100644 --- a/cli/acl.py +++ b/cli/acl.py @@ -18,7 +18,7 @@ """ import os, sys -from autotest_lib.cli import topic_common, action_common +from autotest.cli import topic_common, action_common class acl(topic_common.atest): diff --git a/cli/acl_unittest.py b/cli/acl_unittest.py index e7adf29862..9605dd963f 100755 --- a/cli/acl_unittest.py +++ b/cli/acl_unittest.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import topic_common, action_common, acl, cli_mock +from autotest.cli import topic_common, action_common, acl, cli_mock class acl_list_unittest(cli_mock.cli_unittest): diff --git a/cli/action_common.py b/cli/action_common.py index b6e7a4e88b..898c453bfc 100644 --- a/cli/action_common.py +++ b/cli/action_common.py @@ -41,7 +41,7 @@ """ import re, socket, types -from autotest_lib.cli import topic_common +from autotest.cli import topic_common # diff --git a/cli/action_common_unittest.py b/cli/action_common_unittest.py index cc35bca5fb..3f3e33cfcd 100755 --- a/cli/action_common_unittest.py +++ b/cli/action_common_unittest.py @@ -10,8 +10,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, topic_common, action_common, rpc -from autotest_lib.frontend.afe.json_rpc import proxy +from autotest.cli import cli_mock, topic_common, action_common, rpc +from autotest.frontend.afe.json_rpc import proxy # # List action diff --git a/cli/atest.py b/cli/atest.py index b8312674c5..57dd847cc2 100644 --- a/cli/atest.py +++ b/cli/atest.py @@ -22,7 +22,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import topic_common +from autotest.cli import topic_common def main(): @@ -65,7 +65,7 @@ def main(): elif not os.path.exists(os.path.join(cli_dir, '%s.py' % topic)): syntax_obj.invalid_syntax('Invalid topic %s' % topic) topic_module = common.setup_modules.import_module(topic, - 'autotest_lib.cli') + 'autotest.cli') # If we have a syntax error now, it should # refer to the topic class. diff --git a/cli/atest_unittest.py b/cli/atest_unittest.py index 8c190b0824..d2c1dfe77b 100755 --- a/cli/atest_unittest.py +++ b/cli/atest_unittest.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock +from autotest.cli import cli_mock class main_unittest(cli_mock.cli_unittest): diff --git a/cli/atomicgroup.py b/cli/atomicgroup.py index 580fc5dc2b..3489d2aeba 100644 --- a/cli/atomicgroup.py +++ b/cli/atomicgroup.py @@ -14,7 +14,7 @@ """ import os, sys -from autotest_lib.cli import topic_common, action_common +from autotest.cli import topic_common, action_common class atomicgroup(topic_common.atest): """ diff --git a/cli/atomicgroup_unittest.py b/cli/atomicgroup_unittest.py index c434157160..32a8096c05 100755 --- a/cli/atomicgroup_unittest.py +++ b/cli/atomicgroup_unittest.py @@ -8,7 +8,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, topic_common, atomicgroup +from autotest.cli import cli_mock, topic_common, atomicgroup class atomicgroup_unittest(cli_mock.cli_unittest): diff --git a/cli/autotest-rpc-change-protection-level b/cli/autotest-rpc-change-protection-level index 1ad069677f..eceba0952c 100755 --- a/cli/autotest-rpc-change-protection-level +++ b/cli/autotest-rpc-change-protection-level @@ -7,7 +7,7 @@ try: import autotest.common as common except ImportError: import common -from autotest_lib.cli import rpc, host +from autotest.cli import rpc, host usage = 'usage: %prog [options] new_protection_level machine1 machine2 ...' parser = optparse.OptionParser(usage=usage) diff --git a/cli/autotest-rpc-client b/cli/autotest-rpc-client index 99a6027889..0692d4e3af 100755 --- a/cli/autotest-rpc-client +++ b/cli/autotest-rpc-client @@ -5,7 +5,7 @@ try: import autotest.common as common except ImportError: import common -from autotest_lib.cli import atest +from autotest.cli import atest sys.exit(atest.main()) diff --git a/cli/autotest-rpc-compose-query b/cli/autotest-rpc-compose-query index ba22679705..18e425a80c 100755 --- a/cli/autotest-rpc-compose-query +++ b/cli/autotest-rpc-compose-query @@ -8,8 +8,8 @@ try: import autotest.common except ImportError: import common -from autotest_lib.client.common_lib import kernel_versions -from autotest_lib.tko import display, frontend, db, query_lib +from autotest.client.common_lib import kernel_versions +from autotest.tko import display, frontend, db, query_lib # First do all the options parsing parser = optparse.OptionParser() diff --git a/cli/autotest-rpc-migrate-host b/cli/autotest-rpc-migrate-host index ae751e9a5c..4d02c97125 100755 --- a/cli/autotest-rpc-migrate-host +++ b/cli/autotest-rpc-migrate-host @@ -5,7 +5,7 @@ try: import autotest.common except ImportError: import common -from autotest_lib.server import frontend +from autotest.server import frontend try: old = frontend.AFE(web_server='http://' + sys.argv[1]) diff --git a/cli/autotest-rpc-query-keyvals b/cli/autotest-rpc-query-keyvals index 361bc90b53..8035f11403 100755 --- a/cli/autotest-rpc-query-keyvals +++ b/cli/autotest-rpc-query-keyvals @@ -5,7 +5,7 @@ try: import autotest.common except ImportError: import common -from autotest_lib.cli import rpc +from autotest.cli import rpc def parse_options(): diff --git a/cli/autotest-rpc-query-results b/cli/autotest-rpc-query-results index 4f4ad49321..570d697b11 100755 --- a/cli/autotest-rpc-query-results +++ b/cli/autotest-rpc-query-results @@ -8,8 +8,8 @@ try: import autotest.common except ImportError: import common -from autotest_lib.cli import rpc -from autotest_lib.database import database_connection +from autotest.cli import rpc +from autotest.database import database_connection # First do all the options parsing diff --git a/cli/cli_mock.py b/cli/cli_mock.py index 511afafa6c..b381ac1b50 100644 --- a/cli/cli_mock.py +++ b/cli/cli_mock.py @@ -9,11 +9,11 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import atest, topic_common, rpc -from autotest_lib.frontend.afe import rpc_client_lib -from autotest_lib.frontend.afe.json_rpc import proxy -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib import autotemp +from autotest.cli import atest, topic_common, rpc +from autotest.frontend.afe import rpc_client_lib +from autotest.frontend.afe.json_rpc import proxy +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib import autotemp CLI_USING_PDB = False CLI_UT_DEBUG = False diff --git a/cli/common.py b/cli/common.py index 0a5eb450af..228568bf49 100644 --- a/cli/common.py +++ b/cli/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/cli/contrib/common.py b/cli/contrib/common.py index 6767ca86f6..8c3561a24b 100644 --- a/cli/contrib/common.py +++ b/cli/contrib/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/cli/contrib/why_isnt_my_job_running.py b/cli/contrib/why_isnt_my_job_running.py index 3f4d8186d8..6548c9189c 100755 --- a/cli/contrib/why_isnt_my_job_running.py +++ b/cli/contrib/why_isnt_my_job_running.py @@ -5,8 +5,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import rpc, host -from autotest_lib.client.common_lib import host_queue_entry_states +from autotest.cli import rpc, host +from autotest.client.common_lib import host_queue_entry_states parser = optparse.OptionParser( usage='Usage: %prog [options] []\n\n' diff --git a/cli/host.py b/cli/host.py index 46013717cf..787dc2ac29 100644 --- a/cli/host.py +++ b/cli/host.py @@ -22,8 +22,8 @@ """ import os, sys, socket -from autotest_lib.cli import topic_common, action_common -from autotest_lib.client.common_lib import host_protections +from autotest.cli import topic_common, action_common +from autotest.client.common_lib import host_protections class host(topic_common.atest): diff --git a/cli/host_unittest.py b/cli/host_unittest.py index 3745cc5b72..65b46e1f29 100755 --- a/cli/host_unittest.py +++ b/cli/host_unittest.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, host +from autotest.cli import cli_mock, host class host_ut(cli_mock.cli_unittest): diff --git a/cli/job.py b/cli/job.py index 1e2ae9445d..2b3dac007b 100644 --- a/cli/job.py +++ b/cli/job.py @@ -17,7 +17,7 @@ """ import getpass, os, pwd, re, socket, sys -from autotest_lib.cli import topic_common, action_common +from autotest.cli import topic_common, action_common class job(topic_common.atest): diff --git a/cli/job_unittest.py b/cli/job_unittest.py index 401fc4228f..184a9a86af 100755 --- a/cli/job_unittest.py +++ b/cli/job_unittest.py @@ -11,8 +11,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, topic_common, job -from autotest_lib.client.common_lib.test_utils import mock +from autotest.cli import cli_mock, topic_common, job +from autotest.client.common_lib.test_utils import mock class job_unittest(cli_mock.cli_unittest): diff --git a/cli/label.py b/cli/label.py index 65ad46873c..689035830f 100644 --- a/cli/label.py +++ b/cli/label.py @@ -17,7 +17,7 @@ """ import os, sys -from autotest_lib.cli import topic_common, action_common +from autotest.cli import topic_common, action_common class label(topic_common.atest): diff --git a/cli/label_unittest.py b/cli/label_unittest.py index 952ab5d327..3d40a9a640 100755 --- a/cli/label_unittest.py +++ b/cli/label_unittest.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, topic_common +from autotest.cli import cli_mock, topic_common class label_list_unittest(cli_mock.cli_unittest): diff --git a/cli/rpc.py b/cli/rpc.py index 1cff0c130f..982e168ed8 100644 --- a/cli/rpc.py +++ b/cli/rpc.py @@ -3,9 +3,9 @@ # import os -from autotest_lib.frontend.afe import rpc_client_lib -from autotest_lib.frontend.afe.json_rpc import proxy -from autotest_lib.client.common_lib import global_config, utils +from autotest.frontend.afe import rpc_client_lib +from autotest.frontend.afe.json_rpc import proxy +from autotest.client.common_lib import global_config, utils GLOBAL_CONFIG = global_config.global_config DEFAULT_SERVER = 'autotest' diff --git a/cli/rpc_unittest.py b/cli/rpc_unittest.py index d2607ea87a..1bf1c9ec60 100755 --- a/cli/rpc_unittest.py +++ b/cli/rpc_unittest.py @@ -9,10 +9,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import rpc -from autotest_lib.client.common_lib import global_config -from autotest_lib.frontend.afe import rpc_client_lib -from autotest_lib.frontend.afe.json_rpc import proxy +from autotest.cli import rpc +from autotest.client.common_lib import global_config +from autotest.frontend.afe import rpc_client_lib +from autotest.frontend.afe.json_rpc import proxy GLOBAL_CONFIG = global_config.global_config diff --git a/cli/setup.py b/cli/setup.py index 6b980eab76..505842fd93 100644 --- a/cli/setup.py +++ b/cli/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up cli_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/cli/site_readme.py b/cli/site_readme.py index 3abbe2b2d7..6852f070b5 100644 --- a/cli/site_readme.py +++ b/cli/site_readme.py @@ -11,7 +11,7 @@ import inspect, new, sys -from autotest_lib.cli import topic_common, label +from autotest.cli import topic_common, label class site_label(label.label): diff --git a/cli/test.py b/cli/test.py index ac1605a7a1..7bd3d41d27 100644 --- a/cli/test.py +++ b/cli/test.py @@ -17,7 +17,7 @@ import os, sys -from autotest_lib.cli import topic_common, action_common +from autotest.cli import topic_common, action_common class test(topic_common.atest): diff --git a/cli/test_unittest.py b/cli/test_unittest.py index 180483bba8..545a779a89 100755 --- a/cli/test_unittest.py +++ b/cli/test_unittest.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, topic_common, test +from autotest.cli import cli_mock, topic_common, test class test_list_unittest(cli_mock.cli_unittest): diff --git a/cli/threads_unittest.py b/cli/threads_unittest.py index 82a06fdbb3..29cdca3811 100755 --- a/cli/threads_unittest.py +++ b/cli/threads_unittest.py @@ -12,7 +12,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, threads +from autotest.cli import cli_mock, threads class thread_unittest(cli_mock.cli_unittest): diff --git a/cli/topic_common.py b/cli/topic_common.py index 169ae15d3f..860d210c57 100644 --- a/cli/topic_common.py +++ b/cli/topic_common.py @@ -57,9 +57,9 @@ class __init__() before adding its own parser arguments. import getpass, optparse, os, pwd, re, socket, sys, textwrap, traceback import socket, string, urllib2 -from autotest_lib.cli import rpc -from autotest_lib.frontend.afe.json_rpc import proxy -from autotest_lib.client.common_lib.test_utils import mock +from autotest.cli import rpc +from autotest.frontend.afe.json_rpc import proxy +from autotest.client.common_lib.test_utils import mock # Maps the AFE keys to printable names. diff --git a/cli/topic_common_unittest.py b/cli/topic_common_unittest.py index 63fee87beb..59bc1802f5 100755 --- a/cli/topic_common_unittest.py +++ b/cli/topic_common_unittest.py @@ -10,8 +10,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, topic_common, rpc -from autotest_lib.frontend.afe.json_rpc import proxy +from autotest.cli import cli_mock, topic_common, rpc +from autotest.frontend.afe.json_rpc import proxy class topic_common_misc_tests(unittest.TestCase): diff --git a/cli/user.py b/cli/user.py index 0e4fd49ce8..e319353070 100644 --- a/cli/user.py +++ b/cli/user.py @@ -15,7 +15,7 @@ """ import os, sys -from autotest_lib.cli import topic_common, action_common +from autotest.cli import topic_common, action_common class user(topic_common.atest): diff --git a/cli/user_unittest.py b/cli/user_unittest.py index 8c32969167..9625675997 100755 --- a/cli/user_unittest.py +++ b/cli/user_unittest.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.cli import cli_mock, user +from autotest.cli import cli_mock, user class user_list_unittest(cli_mock.cli_unittest): diff --git a/client/autotest b/client/autotest index 15dcc96740..673d129523 100755 --- a/client/autotest +++ b/client/autotest @@ -7,7 +7,7 @@ try: except ImportError: import common -from autotest_lib.client import autotest_local +from autotest.client import autotest_local if __name__ == '__main__': app = autotest_local.AutotestLocalApp() diff --git a/client/autotest-local b/client/autotest-local index 15dcc96740..673d129523 100755 --- a/client/autotest-local +++ b/client/autotest-local @@ -7,7 +7,7 @@ try: except ImportError: import common -from autotest_lib.client import autotest_local +from autotest.client import autotest_local if __name__ == '__main__': app = autotest_local.AutotestLocalApp() diff --git a/client/autotest_client b/client/autotest_client index aa97293c57..93c5ab4ad3 100755 --- a/client/autotest_client +++ b/client/autotest_client @@ -6,7 +6,7 @@ except ImportError: import sys, os, time, subprocess -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils # We want to set the output (stdout&stderr) of the autotest binary onto our # stdout channel. We went to get the status stream of autotest back on our diff --git a/client/autotest_local.py b/client/autotest_local.py index 68242374bd..2b66bb3b73 100644 --- a/client/autotest_local.py +++ b/client/autotest_local.py @@ -10,9 +10,9 @@ autodir = os.path.dirname(autodirbin) sys.path.insert(0, autodirbin) -from autotest_lib.client import job -from autotest_lib.client.common_lib import global_config -from autotest_lib.client import cmdparser, optparser +from autotest.client import job +from autotest.client.common_lib import global_config +from autotest.client import cmdparser, optparser autodirtest = os.path.join(autodir, "tests") @@ -61,7 +61,7 @@ def main(self): default=True) if self.options.client_test_setup: - from autotest_lib.client import setup_job + from autotest.client import setup_job exit_code = 0 try: setup_job.setup_tests(self.options) diff --git a/client/base_sysinfo.py b/client/base_sysinfo.py index 14d65cce2f..2a83b93d33 100644 --- a/client/base_sysinfo.py +++ b/client/base_sysinfo.py @@ -1,7 +1,7 @@ import os, shutil, re, glob, subprocess, logging, gzip -from autotest_lib.client.common_lib import log, global_config -from autotest_lib.client import utils, package +from autotest.client.common_lib import log, global_config +from autotest.client import utils, package GLOBAL_CONFIG = global_config.global_config diff --git a/client/base_utils.py b/client/base_utils.py index 6c3b5f8ee7..e6d84d1a44 100644 --- a/client/base_utils.py +++ b/client/base_utils.py @@ -9,7 +9,7 @@ """ import os, shutil, sys, signal, commands, pickle, glob, statvfs import math, re, string, fnmatch, logging -from autotest_lib.client.common_lib import error, utils, magic +from autotest.client.common_lib import error, utils, magic def grep(pattern, file): diff --git a/client/boottool.py b/client/boottool.py index 9f45488367..75e44bfd6b 100644 --- a/client/boottool.py +++ b/client/boottool.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client.common_lib import boottool as common_boottool +from autotest.client.common_lib import utils, error +from autotest.client.common_lib import boottool as common_boottool class boottool(common_boottool.boottool): def __init__(self, boottool_exec=None): diff --git a/client/client_logging_config.py b/client/client_logging_config.py index 2dff8c59af..7caba0ae92 100644 --- a/client/client_logging_config.py +++ b/client/client_logging_config.py @@ -3,7 +3,7 @@ except ImportError: import common import logging, os -from autotest_lib.client.common_lib import logging_config, global_config +from autotest.client.common_lib import logging_config, global_config class ClientLoggingConfig(logging_config.LoggingConfig): def add_debug_file_handlers(self, log_dir, log_name=None): diff --git a/client/cmdparser.py b/client/cmdparser.py index d21c731505..402bcb8587 100644 --- a/client/cmdparser.py +++ b/client/cmdparser.py @@ -5,8 +5,8 @@ """ import os, re, sys -from autotest_lib.client import os_dep -from autotest_lib.client.common_lib import global_config +from autotest.client import os_dep +from autotest.client.common_lib import global_config GLOBAL_CONFIG = global_config.global_config diff --git a/client/common.py b/client/common.py index bd867d661c..12ed1ebcbd 100644 --- a/client/common.py +++ b/client/common.py @@ -9,4 +9,4 @@ sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/common_lib/autotemp_unittest.py b/client/common_lib/autotemp_unittest.py index d101017616..bdf1cf563e 100755 --- a/client/common_lib/autotemp_unittest.py +++ b/client/common_lib/autotemp_unittest.py @@ -5,7 +5,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import autotemp +from autotest.client.common_lib import autotemp class tempfile_test(unittest.TestCase): diff --git a/client/common_lib/barrier.py b/client/common_lib/barrier.py index 3df56db5e1..05aea00b04 100644 --- a/client/common_lib/barrier.py +++ b/client/common_lib/barrier.py @@ -1,7 +1,7 @@ -from autotest_lib.client.common_lib.base_barrier import listen_server, barrier -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib.base_barrier import listen_server, barrier +from autotest.client.common_lib import utils -_SITE_MODULE_NAME = 'autotest_lib.client.common_lib.site_barrier' +_SITE_MODULE_NAME = 'autotest.client.common_lib.site_barrier' listen_server = utils.import_site_symbol( __file__, _SITE_MODULE_NAME, 'listen_server', listen_server) barrier = utils.import_site_symbol( diff --git a/client/common_lib/barrier_unittest.py b/client/common_lib/barrier_unittest.py index ceebc801c5..1295aa32ff 100755 --- a/client/common_lib/barrier_unittest.py +++ b/client/common_lib/barrier_unittest.py @@ -8,9 +8,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import error, base_barrier +from autotest.client.common_lib import error, base_barrier barrier = base_barrier -from autotest_lib.client.common_lib.test_utils import mock +from autotest.client.common_lib.test_utils import mock class listen_server_test(unittest.TestCase): diff --git a/client/common_lib/base_barrier.py b/client/common_lib/base_barrier.py index df4da49195..8c74d2c1e6 100644 --- a/client/common_lib/base_barrier.py +++ b/client/common_lib/base_barrier.py @@ -1,6 +1,6 @@ import sys, socket, errno, logging from time import time, sleep -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error # default barrier port _DEFAULT_PORT = 11922 diff --git a/client/common_lib/base_barrier_unittest.py b/client/common_lib/base_barrier_unittest.py index 926c385e62..eed052396d 100755 --- a/client/common_lib/base_barrier_unittest.py +++ b/client/common_lib/base_barrier_unittest.py @@ -8,8 +8,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import error, barrier, base_barrier -from autotest_lib.client.common_lib.test_utils import mock +from autotest.client.common_lib import error, barrier, base_barrier +from autotest.client.common_lib.test_utils import mock class listen_server_test(unittest.TestCase): diff --git a/client/common_lib/base_job.py b/client/common_lib/base_job.py index b6ff74e8ce..ce106b9315 100644 --- a/client/common_lib/base_job.py +++ b/client/common_lib/base_job.py @@ -1,7 +1,7 @@ import os, copy, logging, errno, fcntl, time, re, weakref, traceback import tarfile import cPickle as pickle -from autotest_lib.client.common_lib import autotemp, error, log, global_config +from autotest.client.common_lib import autotemp, error, log, global_config GLOBAL_CONFIG = global_config.global_config @@ -432,7 +432,7 @@ def __init__(self, status_code, subdir, operation, message, fields, """Construct a status.log entry. @param status_code: A message status code. Must match the codes - accepted by autotest_lib.common_lib.log.is_valid_status. + accepted by autotest.common_lib.log.is_valid_status. @param subdir: A valid job subdirectory, or None. @param operation: Description of the operation, or None. @param message: A printable string describing event to be recorded. diff --git a/client/common_lib/base_job_unittest.py b/client/common_lib/base_job_unittest.py index d38417c1ec..6fcdbc5c89 100755 --- a/client/common_lib/base_job_unittest.py +++ b/client/common_lib/base_job_unittest.py @@ -6,8 +6,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import base_job, error -from autotest_lib.client.common_lib.test_utils import unittest +from autotest.client.common_lib import base_job, error +from autotest.client.common_lib.test_utils import unittest class stub_job_directory(object): diff --git a/client/common_lib/base_packages.py b/client/common_lib/base_packages.py index 1ee16503ec..804257f0f3 100644 --- a/client/common_lib/base_packages.py +++ b/client/common_lib/base_packages.py @@ -6,8 +6,8 @@ """ import fcntl, logging, os, re, shutil -from autotest_lib.client import os_dep -from autotest_lib.client.common_lib import error, utils, global_config +from autotest.client import os_dep +from autotest.client.common_lib import error, utils, global_config # the name of the checksum file that stores the packages' checksums @@ -309,7 +309,7 @@ def upkeep(self, custom_repos=None): ''' Clean up custom upload/download areas ''' - from autotest_lib.server import subcommand + from autotest.server import subcommand if not custom_repos: # Not all package types necessarily require or allow custom repos try: @@ -471,7 +471,7 @@ def fetch_pkg(self, pkg_name, dest_path, repo_url=None, use_checksum=False): def upload_pkg(self, pkg_path, upload_path=None, update_checksum=False, timeout=300): - from autotest_lib.server import subcommand + from autotest.server import subcommand if upload_path: upload_path_list = [upload_path] self.upkeep(upload_path_list) diff --git a/client/common_lib/base_syncdata.py b/client/common_lib/base_syncdata.py index dba282537a..ca32aa5385 100644 --- a/client/common_lib/base_syncdata.py +++ b/client/common_lib/base_syncdata.py @@ -1,9 +1,9 @@ import pickle, time, socket, errno, threading, logging, signal -from autotest_lib.client.common_lib import error -from autotest_lib.client.common_lib import barrier -from autotest_lib.client.common_lib import utils -from autotest_lib.client.common_lib import autotemp -from autotest_lib.client import parallel +from autotest.client.common_lib import error +from autotest.client.common_lib import barrier +from autotest.client.common_lib import utils +from autotest.client.common_lib import autotemp +from autotest.client import parallel _DEFAULT_PORT = 13234 _DEFAULT_TIMEOUT = 10 diff --git a/client/common_lib/base_syncdata_unittest.py b/client/common_lib/base_syncdata_unittest.py index 6a78bd726a..241bef29e7 100755 --- a/client/common_lib/base_syncdata_unittest.py +++ b/client/common_lib/base_syncdata_unittest.py @@ -7,9 +7,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock, unittest -from autotest_lib.client.common_lib import error, base_syncdata, barrier -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib.test_utils import mock, unittest +from autotest.client.common_lib import error, base_syncdata, barrier +from autotest.client.common_lib import utils syncdata = base_syncdata diff --git a/client/common_lib/base_utils.py b/client/common_lib/base_utils.py index c40e5dcfb4..4905bcc86e 100644 --- a/client/common_lib/base_utils.py +++ b/client/common_lib/base_utils.py @@ -9,8 +9,8 @@ import hashlib except ImportError: import md5, sha -from autotest_lib.client.common_lib import error, logging_manager, global_config -from autotest_lib.client.common_lib import progressbar +from autotest.client.common_lib import error, logging_manager, global_config +from autotest.client.common_lib import progressbar GLOBAL_CONFIG = global_config.global_config diff --git a/client/common_lib/base_utils_unittest.py b/client/common_lib/base_utils_unittest.py index aeb2e49be7..9f052d8e56 100755 --- a/client/common_lib/base_utils_unittest.py +++ b/client/common_lib/base_utils_unittest.py @@ -6,8 +6,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import base_utils, autotemp -from autotest_lib.client.common_lib.test_utils import mock +from autotest.client.common_lib import base_utils, autotemp +from autotest.client.common_lib.test_utils import mock class test_read_one_line(unittest.TestCase): diff --git a/client/common_lib/boottool.py b/client/common_lib/boottool.py index 3a7bff22c6..331d20504e 100644 --- a/client/common_lib/boottool.py +++ b/client/common_lib/boottool.py @@ -14,7 +14,7 @@ ''' import os, sys, imp -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error # # This performs some import magic, to import the boottool cli as a module try: diff --git a/client/common_lib/boottool_unittest.py b/client/common_lib/boottool_unittest.py index ede0301d9d..bfbf0de836 100755 --- a/client/common_lib/boottool_unittest.py +++ b/client/common_lib/boottool_unittest.py @@ -6,8 +6,8 @@ except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib import boottool +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib import boottool class TestEfiSys(unittest.TestCase): def setUp(self): diff --git a/client/common_lib/common.py b/client/common_lib/common.py index 9df4b7eaf2..698a00a398 100644 --- a/client/common_lib/common.py +++ b/client/common_lib/common.py @@ -10,4 +10,4 @@ sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/common_lib/control_data_unittest.py b/client/common_lib/control_data_unittest.py index 7e8138a232..d9e158642b 100755 --- a/client/common_lib/control_data_unittest.py +++ b/client/common_lib/control_data_unittest.py @@ -5,7 +5,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import control_data, autotemp +from autotest.client.common_lib import control_data, autotemp ControlData = control_data.ControlData diff --git a/client/common_lib/git.py b/client/common_lib/git.py index aa5de6ec23..499306f4e0 100644 --- a/client/common_lib/git.py +++ b/client/common_lib/git.py @@ -5,7 +5,7 @@ import os, logging import error -from autotest_lib.client import utils, os_dep +from autotest.client import utils, os_dep __all__ = ["GitRepoHelper", "get_repo"] diff --git a/client/common_lib/global_config.py b/client/common_lib/global_config.py index 39e90caa36..39ec5c602d 100644 --- a/client/common_lib/global_config.py +++ b/client/common_lib/global_config.py @@ -6,7 +6,7 @@ __author__ = 'raphtee@google.com (Travis Miller)' import os, sys, ConfigParser, logging -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error class ConfigError(error.AutotestError): diff --git a/client/common_lib/global_config_unittest.py b/client/common_lib/global_config_unittest.py index 7230174077..80195fcae7 100755 --- a/client/common_lib/global_config_unittest.py +++ b/client/common_lib/global_config_unittest.py @@ -5,8 +5,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib import autotemp +from autotest.client.common_lib import global_config +from autotest.client.common_lib import autotemp global_config_ini_contents = """ diff --git a/client/common_lib/host_protections.py b/client/common_lib/host_protections.py index b5b215627d..83eef7615c 100644 --- a/client/common_lib/host_protections.py +++ b/client/common_lib/host_protections.py @@ -1,5 +1,5 @@ import logging -from autotest_lib.client.common_lib import enum, global_config +from autotest.client.common_lib import enum, global_config # Changing this file has consequences that need to be understood. # Adding a protection level to the enum requires you to append your change to diff --git a/client/common_lib/host_queue_entry_states.py b/client/common_lib/host_queue_entry_states.py index b594059644..3cb2eab2e7 100644 --- a/client/common_lib/host_queue_entry_states.py +++ b/client/common_lib/host_queue_entry_states.py @@ -5,7 +5,7 @@ that frontend.afe.models depends on such as RPC clients. """ -from autotest_lib.client.common_lib import enum +from autotest.client.common_lib import enum Status = enum.Enum('Queued', 'Starting', 'Verifying', 'Pending', 'Waiting', 'Running', 'Gathering', 'Parsing', 'Archiving', 'Aborted', diff --git a/client/common_lib/hosts/__init__.py b/client/common_lib/hosts/__init__.py index e065821d29..dd48efafd5 100644 --- a/client/common_lib/hosts/__init__.py +++ b/client/common_lib/hosts/__init__.py @@ -6,9 +6,9 @@ You should 'import hosts' instead of importing every available host module. """ -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils import base_classes Host = utils.import_site_class( - __file__, "autotest_lib.client.common_lib.hosts.site_host", "SiteHost", + __file__, "autotest.client.common_lib.hosts.site_host", "SiteHost", base_classes.Host) diff --git a/client/common_lib/hosts/base_classes.py b/client/common_lib/hosts/base_classes.py index 5ddb347616..5c43c7b9cf 100644 --- a/client/common_lib/hosts/base_classes.py +++ b/client/common_lib/hosts/base_classes.py @@ -17,9 +17,9 @@ import cPickle, cStringIO, logging, os, re, time -from autotest_lib.client.common_lib import global_config, error, utils -from autotest_lib.client.common_lib import host_protections -from autotest_lib.client import partition +from autotest.client.common_lib import global_config, error, utils +from autotest.client.common_lib import host_protections +from autotest.client import partition class Host(object): diff --git a/client/common_lib/hosts/base_classes_unittest.py b/client/common_lib/hosts/base_classes_unittest.py index cb6c0805ff..84d762e879 100755 --- a/client/common_lib/hosts/base_classes_unittest.py +++ b/client/common_lib/hosts/base_classes_unittest.py @@ -6,9 +6,9 @@ except ImportError: import common -from autotest_lib.client.common_lib import error, utils -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib.hosts import base_classes +from autotest.client.common_lib import error, utils +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib.hosts import base_classes class test_host_class(unittest.TestCase): diff --git a/client/common_lib/hosts/common.py b/client/common_lib/hosts/common.py index ce78b85930..320a06f850 100644 --- a/client/common_lib/hosts/common.py +++ b/client/common_lib/hosts/common.py @@ -5,4 +5,4 @@ import setup_modules sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/common_lib/iso9660.py b/client/common_lib/iso9660.py index a82f3f52bb..2db55bc43b 100644 --- a/client/common_lib/iso9660.py +++ b/client/common_lib/iso9660.py @@ -12,7 +12,7 @@ import os, logging, tempfile, shutil import common -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils def has_userland_tool(executable): diff --git a/client/common_lib/logging_config.py b/client/common_lib/logging_config.py index cad5936a43..09f1be9cbc 100644 --- a/client/common_lib/logging_config.py +++ b/client/common_lib/logging_config.py @@ -1,5 +1,5 @@ import logging, os, sys, time -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config GLOBAL_CONFIG = global_config.global_config diff --git a/client/common_lib/logging_manager_test.py b/client/common_lib/logging_manager_test.py index 4711d346d7..9eebe3c053 100755 --- a/client/common_lib/logging_manager_test.py +++ b/client/common_lib/logging_manager_test.py @@ -5,7 +5,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import logging_manager, logging_config +from autotest.client.common_lib import logging_manager, logging_config class PipedStringIO(object): diff --git a/client/common_lib/packages.py b/client/common_lib/packages.py index 90566eae8b..c2332d9135 100644 --- a/client/common_lib/packages.py +++ b/client/common_lib/packages.py @@ -1,8 +1,8 @@ -from autotest_lib.client.common_lib import utils, base_packages +from autotest.client.common_lib import utils, base_packages SitePackageManager = utils.import_site_class( - __file__, "autotest_lib.client.common_lib.site_packages", + __file__, "autotest.client.common_lib.site_packages", "SitePackageManager", base_packages.BasePackageManager) diff --git a/client/common_lib/profiler_manager.py b/client/common_lib/profiler_manager.py index 95269edd1e..8a0e1cd1e6 100644 --- a/client/common_lib/profiler_manager.py +++ b/client/common_lib/profiler_manager.py @@ -4,7 +4,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import error, utils, packages +from autotest.client.common_lib import error, utils, packages class ProfilerNotPresentError(error.JobError): diff --git a/client/common_lib/profiler_manager_unittest.py b/client/common_lib/profiler_manager_unittest.py index 799cd3c7f7..8184a4c49b 100755 --- a/client/common_lib/profiler_manager_unittest.py +++ b/client/common_lib/profiler_manager_unittest.py @@ -5,7 +5,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import profiler_manager +from autotest.client.common_lib import profiler_manager # simple job stub for using in tests diff --git a/client/common_lib/software_manager.py b/client/common_lib/software_manager.py index fad8cc4836..fa108fdbd6 100755 --- a/client/common_lib/software_manager.py +++ b/client/common_lib/software_manager.py @@ -24,9 +24,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client import os_dep, utils -from autotest_lib.client.common_lib import error -from autotest_lib.client.common_lib import logging_config, logging_manager +from autotest.client import os_dep, utils +from autotest.client.common_lib import error +from autotest.client.common_lib import logging_config, logging_manager def generate_random_string(length): diff --git a/client/common_lib/syncdata.py b/client/common_lib/syncdata.py index 922fa4c7a9..39489c4af1 100644 --- a/client/common_lib/syncdata.py +++ b/client/common_lib/syncdata.py @@ -1,10 +1,10 @@ -from autotest_lib.client.common_lib.base_syncdata import SyncData -from autotest_lib.client.common_lib.base_syncdata import SyncListenServer -from autotest_lib.client.common_lib.base_syncdata import net_send_object -from autotest_lib.client.common_lib.base_syncdata import net_recv_object -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib.base_syncdata import SyncData +from autotest.client.common_lib.base_syncdata import SyncListenServer +from autotest.client.common_lib.base_syncdata import net_send_object +from autotest.client.common_lib.base_syncdata import net_recv_object +from autotest.client.common_lib import utils -_SITE_MODULE_NAME = 'autotest_lib.client.common_lib.site_syncdata' +_SITE_MODULE_NAME = 'autotest.client.common_lib.site_syncdata' net_send_object = utils.import_site_symbol( __file__, _SITE_MODULE_NAME, 'net_send_object', net_send_object) net_recv_object = utils.import_site_symbol( diff --git a/client/common_lib/test.py b/client/common_lib/test.py index 81389623a3..794514f8e8 100644 --- a/client/common_lib/test.py +++ b/client/common_lib/test.py @@ -18,8 +18,8 @@ import fcntl, getpass, os, re, sys, shutil, tempfile, time, traceback, logging -from autotest_lib.client.common_lib import error, global_config -from autotest_lib.client import utils +from autotest.client.common_lib import error, global_config +from autotest.client import utils GLOBAL_CONFIG = global_config.global_config diff --git a/client/common_lib/test_unittest.py b/client/common_lib/test_unittest.py index 1d198524f5..1e6411dc8c 100755 --- a/client/common_lib/test_unittest.py +++ b/client/common_lib/test_unittest.py @@ -10,8 +10,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import error, test -from autotest_lib.client.common_lib.test_utils import mock +from autotest.client.common_lib import error, test +from autotest.client.common_lib.test_utils import mock class TestTestCase(unittest.TestCase): class _neutered_base_test(test.base_test): diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py index 382f79d50c..573965a160 100644 --- a/client/common_lib/utils.py +++ b/client/common_lib/utils.py @@ -8,6 +8,6 @@ inheritance with, just a collection of static methods. """ -from autotest_lib.client.common_lib.base_utils import * +from autotest.client.common_lib.base_utils import * if os.path.exists(os.path.join(os.path.dirname(__file__), 'site_utils.py')): - from autotest_lib.client.common_lib.site_utils import * + from autotest.client.common_lib.site_utils import * diff --git a/client/cpuset.py b/client/cpuset.py index 8d0ce4bcd2..0db3de5df2 100644 --- a/client/cpuset.py +++ b/client/cpuset.py @@ -5,8 +5,8 @@ # for use on kernels not running some site-specific container manager import os, sys, re, glob, fcntl, logging -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error +from autotest.client import utils +from autotest.client.common_lib import error SUPER_ROOT = '' # root of all containers or cgroups NO_LIMIT = (1 << 63) - 1 # containername/memory.limit_in_bytes if no limit diff --git a/client/deps/boottool/boottool.py b/client/deps/boottool/boottool.py index bb9228c76f..438032e8cb 100755 --- a/client/deps/boottool/boottool.py +++ b/client/deps/boottool/boottool.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils # To use this, you have to set PERL5LIB to: # autodir+'deps/boottool/lib/perl' diff --git a/client/deps/dejagnu/dejagnu.py b/client/deps/dejagnu/dejagnu.py index 1ce9cfc7b2..74d34e5f68 100755 --- a/client/deps/dejagnu/dejagnu.py +++ b/client/deps/dejagnu/dejagnu.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 1 diff --git a/client/deps/grubby/grubby.py b/client/deps/grubby/grubby.py index 06520cfdd4..7c119d9072 100755 --- a/client/deps/grubby/grubby.py +++ b/client/deps/grubby/grubby.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 1 diff --git a/client/deps/libaio/libaio.py b/client/deps/libaio/libaio.py index 78beff1b0a..c774376224 100755 --- a/client/deps/libaio/libaio.py +++ b/client/deps/libaio/libaio.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 1 diff --git a/client/deps/libcap/libcap.py b/client/deps/libcap/libcap.py index ff37aa2897..4abf1071da 100755 --- a/client/deps/libcap/libcap.py +++ b/client/deps/libcap/libcap.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 2 diff --git a/client/deps/libnet/libnet.py b/client/deps/libnet/libnet.py index 1b7674c10f..517394b15e 100755 --- a/client/deps/libnet/libnet.py +++ b/client/deps/libnet/libnet.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 1 diff --git a/client/deps/mysql/mysql.py b/client/deps/mysql/mysql.py index ff1c87a78f..cd1a1f7b26 100755 --- a/client/deps/mysql/mysql.py +++ b/client/deps/mysql/mysql.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 3 diff --git a/client/deps/pgpool/pgpool.py b/client/deps/pgpool/pgpool.py index 3b6156d48b..86dea096c3 100755 --- a/client/deps/pgpool/pgpool.py +++ b/client/deps/pgpool/pgpool.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 1 diff --git a/client/deps/pgsql/pgsql.py b/client/deps/pgsql/pgsql.py index 96ab31c5e7..b01e044ae9 100755 --- a/client/deps/pgsql/pgsql.py +++ b/client/deps/pgsql/pgsql.py @@ -1,7 +1,7 @@ #!/usr/bin/python import os -from autotest_lib.client import utils +from autotest.client import utils version = 4 diff --git a/client/deps/systemtap/systemtap.py b/client/deps/systemtap/systemtap.py index 67592ad400..8b280c69b3 100755 --- a/client/deps/systemtap/systemtap.py +++ b/client/deps/systemtap/systemtap.py @@ -2,7 +2,7 @@ import os import shutil -from autotest_lib.client import utils +from autotest.client import utils version = 1 diff --git a/client/fsdev_disks.py b/client/fsdev_disks.py index 21139f8eef..f911d84fd1 100644 --- a/client/fsdev_disks.py +++ b/client/fsdev_disks.py @@ -1,6 +1,6 @@ import sys, os, re, string -from autotest_lib.client import utils, fsinfo, fsdev_mgr, partition -from autotest_lib.client.common_lib import error +from autotest.client import utils, fsinfo, fsdev_mgr, partition +from autotest.client.common_lib import error fd_mgr = fsdev_mgr.FsdevManager() diff --git a/client/fsdev_disks_unittest.py b/client/fsdev_disks_unittest.py index 13dbcbed83..672a095af8 100755 --- a/client/fsdev_disks_unittest.py +++ b/client/fsdev_disks_unittest.py @@ -9,7 +9,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client import fsdev_disks +from autotest.client import fsdev_disks class fsdev_disks_test(unittest.TestCase): def test_legacy_str_to_test_flags(self): diff --git a/client/fsdev_mgr.py b/client/fsdev_mgr.py index 62f04910ec..7c86e57283 100644 --- a/client/fsdev_mgr.py +++ b/client/fsdev_mgr.py @@ -4,7 +4,7 @@ to any of these methods should inherit this class. """ -from autotest_lib.client import utils +from autotest.client import utils class BaseFsdevManager(object): @@ -43,7 +43,7 @@ def use_partition(self, part_name): SiteFsdevManager = utils.import_site_class( - __file__, "autotest_lib.client.site_fsdev", "SiteFsdevManager", + __file__, "autotest.client.site_fsdev", "SiteFsdevManager", BaseFsdevManager) # Wrap whatever SiteFsdevManager class we've found above in a class diff --git a/client/fsinfo.py b/client/fsinfo.py index 3383b2b11e..5f42419375 100644 --- a/client/fsinfo.py +++ b/client/fsinfo.py @@ -8,7 +8,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import error, utils +from autotest.client.common_lib import error, utils def opt_string2dict(opt_string): diff --git a/client/fsinfo_unittest.py b/client/fsinfo_unittest.py index 8981b5c092..6847ef4efd 100755 --- a/client/fsinfo_unittest.py +++ b/client/fsinfo_unittest.py @@ -5,8 +5,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client import fsinfo -from autotest_lib.client.common_lib.test_utils import mock +from autotest.client import fsinfo +from autotest.client.common_lib.test_utils import mock class fsionfo_test(unittest.TestCase): diff --git a/client/harness.py b/client/harness.py index 9625a42930..18ed7bdad9 100644 --- a/client/harness.py +++ b/client/harness.py @@ -94,7 +94,7 @@ def select(which, job, harness_args): harness_name = 'harness_%s' % which harness_module = common.setup_modules.import_module(harness_name, - 'autotest_lib.client') + 'autotest.client') harness_instance = getattr(harness_module, harness_name)(job, harness_args) return harness_instance diff --git a/client/harness_ABAT.py b/client/harness_ABAT.py index e23387d630..7db19a5ed8 100644 --- a/client/harness_ABAT.py +++ b/client/harness_ABAT.py @@ -5,7 +5,7 @@ __author__ = """Copyright Andy Whitcroft 2006""" -from autotest_lib.client import utils +from autotest.client import utils import os, harness, time, re def autobench_load(fn): diff --git a/client/harness_autoserv.py b/client/harness_autoserv.py index f8b3d2f9f3..ee0510b7e9 100644 --- a/client/harness_autoserv.py +++ b/client/harness_autoserv.py @@ -1,7 +1,7 @@ import os, logging, ConfigParser -from autotest_lib.client.common_lib import autotemp, base_packages, error -from autotest_lib.client.common_lib import global_config -from autotest_lib.client import harness +from autotest.client.common_lib import autotemp, base_packages, error +from autotest.client.common_lib import global_config +from autotest.client import harness class harness_autoserv(harness.harness): diff --git a/client/harness_standalone.py b/client/harness_standalone.py index 6f178d7c86..d3dc7f9860 100644 --- a/client/harness_standalone.py +++ b/client/harness_standalone.py @@ -5,8 +5,8 @@ __author__ = """Copyright Andy Whitcroft 2007""" -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils import os, harness, shutil, logging class harness_standalone(harness.harness): diff --git a/client/harness_unittest.py b/client/harness_unittest.py index efdae318f2..47b444db05 100755 --- a/client/harness_unittest.py +++ b/client/harness_unittest.py @@ -4,8 +4,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client import harness, harness_standalone, harness_ABAT +from autotest.client.common_lib.test_utils import mock +from autotest.client import harness, harness_standalone, harness_ABAT class harness_unittest(unittest.TestCase): diff --git a/client/job.py b/client/job.py index b5ded38d7b..d5ed862451 100644 --- a/client/job.py +++ b/client/job.py @@ -8,23 +8,23 @@ import copy, os, platform, re, shutil, sys, time, traceback, types, glob import logging, getpass, errno, weakref import cPickle as pickle -from autotest_lib.client import client_logging_config -from autotest_lib.client import utils, parallel, kernel, xen -from autotest_lib.client import profilers, boottool, harness -from autotest_lib.client import config, sysinfo, test, local_host -from autotest_lib.client import partition as partition_lib -from autotest_lib.client.common_lib import base_job -from autotest_lib.client.common_lib import error, barrier, log, logging_manager -from autotest_lib.client.common_lib import base_packages, packages -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.tools import html_report +from autotest.client import client_logging_config +from autotest.client import utils, parallel, kernel, xen +from autotest.client import profilers, boottool, harness +from autotest.client import config, sysinfo, test, local_host +from autotest.client import partition as partition_lib +from autotest.client.common_lib import base_job +from autotest.client.common_lib import error, barrier, log, logging_manager +from autotest.client.common_lib import base_packages, packages +from autotest.client.common_lib import global_config +from autotest.client.tools import html_report GLOBAL_CONFIG = global_config.global_config LAST_BOOT_TAG = object() JOB_PREAMBLE = """ -from autotest_lib.client.common_lib.error import * -from autotest_lib.client.utils import * +from autotest.client.common_lib.error import * +from autotest.client.utils import * """ @@ -1349,7 +1349,7 @@ def runjob(control, drop_caches, options): site_job = utils.import_site_class( - __file__, "autotest_lib.client.site_job", "site_job", base_client_job) + __file__, "autotest.client.site_job", "site_job", base_client_job) class job(site_job): pass diff --git a/client/job_unittest.py b/client/job_unittest.py index 958f13af98..9217acba36 100755 --- a/client/job_unittest.py +++ b/client/job_unittest.py @@ -6,13 +6,13 @@ except ImportError: import common -from autotest_lib.client import job, boottool, config, sysinfo, harness -from autotest_lib.client import test, xen, kernel, utils -from autotest_lib.client.common_lib import packages, error, log, global_config -from autotest_lib.client.common_lib.global_config import global_config -from autotest_lib.client.common_lib import logging_manager, logging_config -from autotest_lib.client.common_lib import base_job_unittest -from autotest_lib.client.common_lib.test_utils import mock, unittest +from autotest.client import job, boottool, config, sysinfo, harness +from autotest.client import test, xen, kernel, utils +from autotest.client.common_lib import packages, error, log, global_config +from autotest.client.common_lib.global_config import global_config +from autotest.client.common_lib import logging_manager, logging_config +from autotest.client.common_lib import base_job_unittest +from autotest.client.common_lib.test_utils import mock, unittest class job_test_case(unittest.TestCase): diff --git a/client/kernel.py b/client/kernel.py index 11099ffe0f..a8c0b923f0 100644 --- a/client/kernel.py +++ b/client/kernel.py @@ -1,7 +1,7 @@ import os, shutil, copy, pickle, re, glob, time, logging -from autotest_lib.client import kernel_config, os_dep, kernelexpand, test -from autotest_lib.client import utils -from autotest_lib.client.common_lib import log, error, packages +from autotest.client import kernel_config, os_dep, kernelexpand, test +from autotest.client import utils +from autotest.client.common_lib import log, error, packages def tee_output_logdir_mark(fn): @@ -841,7 +841,7 @@ def _preprocess_path_dummy(path): # pull in some optional site-specific path pre-processing preprocess_path = utils.import_site_function(__file__, - "autotest_lib.client.site_kernel", "preprocess_path", + "autotest.client.site_kernel", "preprocess_path", _preprocess_path_dummy) diff --git a/client/kernel_config.py b/client/kernel_config.py index 9638c589eb..baf51e3924 100644 --- a/client/kernel_config.py +++ b/client/kernel_config.py @@ -2,8 +2,8 @@ # the repo. import shutil, os -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error, kernel_versions +from autotest.client import utils +from autotest.client.common_lib import error, kernel_versions def apply_overrides(orig_file, changes_file, output_file): override = dict() diff --git a/client/kernel_unittest.py b/client/kernel_unittest.py index 05381ac051..16ccaaff80 100755 --- a/client/kernel_unittest.py +++ b/client/kernel_unittest.py @@ -5,9 +5,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client import kernel, job, utils, kernelexpand -from autotest_lib.client import kernel_config, boottool, os_dep +from autotest.client.common_lib.test_utils import mock +from autotest.client import kernel, job, utils, kernelexpand +from autotest.client import kernel_config, boottool, os_dep class TestAddKernelToBootLoader(unittest.TestCase): diff --git a/client/kernel_versions_unittest.py b/client/kernel_versions_unittest.py index 318676abb1..71b0440eb6 100755 --- a/client/kernel_versions_unittest.py +++ b/client/kernel_versions_unittest.py @@ -4,7 +4,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client import kernel_versions +from autotest.client import kernel_versions class kernel_versions_test(unittest.TestCase): diff --git a/client/kernelexpand.py b/client/kernelexpand.py index 9b551a0874..b6e0b7b1b0 100755 --- a/client/kernelexpand.py +++ b/client/kernelexpand.py @@ -17,7 +17,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config import sys, re, os, urllib2 GLOBAL_CONFIG = global_config.global_config diff --git a/client/kernelexpand_unittest.py b/client/kernelexpand_unittest.py index 30d1b6f01c..93d37bb58b 100755 --- a/client/kernelexpand_unittest.py +++ b/client/kernelexpand_unittest.py @@ -7,9 +7,9 @@ import common from kernelexpand import decompose_kernel from kernelexpand import mirror_kernel_components -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib.global_config import global_config -from autotest_lib.client.common_lib.test_utils import mock +from autotest.client.common_lib import global_config +from autotest.client.common_lib.global_config import global_config +from autotest.client.common_lib.test_utils import mock km = 'http://www.kernel.org/pub/linux/kernel/' akpm = km + 'people/akpm/patches/' diff --git a/client/kvm_control.py b/client/kvm_control.py index 4f50bca989..9d06345a21 100644 --- a/client/kvm_control.py +++ b/client/kvm_control.py @@ -2,8 +2,8 @@ Utilities useful to client control files that test KVM. """ -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error +from autotest.client import utils +from autotest.client.common_lib import error def get_kvm_arch(): """ diff --git a/client/local_host.py b/client/local_host.py index 138c69d24a..38781c2621 100644 --- a/client/local_host.py +++ b/client/local_host.py @@ -5,8 +5,8 @@ """ import glob, os, platform -from autotest_lib.client.common_lib import hosts, error -from autotest_lib.client import utils +from autotest.client.common_lib import hosts, error +from autotest.client import utils class LocalHost(hosts.Host): def _initialize(self, hostname=None, bootloader=None, *args, **dargs): diff --git a/client/local_host_unittest.py b/client/local_host_unittest.py index d397e47a24..47cf7e19a5 100755 --- a/client/local_host_unittest.py +++ b/client/local_host_unittest.py @@ -6,9 +6,9 @@ except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock, unittest -from autotest_lib.client.common_lib import autotemp -from autotest_lib.client import local_host +from autotest.client.common_lib.test_utils import mock, unittest +from autotest.client.common_lib import autotemp +from autotest.client import local_host class test_local_host_class(unittest.TestCase): diff --git a/client/net/common.py b/client/net/common.py index 9df4b7eaf2..698a00a398 100644 --- a/client/net/common.py +++ b/client/net/common.py @@ -10,4 +10,4 @@ sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/net/net_tc.py b/client/net/net_tc.py index 90a9eaeb61..a33e9471d0 100644 --- a/client/net/net_tc.py +++ b/client/net/net_tc.py @@ -7,8 +7,8 @@ import autotest.common as common except ImportError: import common - from autotest_lib.client.net.net_tc import * - from autotest_lib.client.net.net_utils import * + from autotest.client.net.net_tc import * + from autotest.client.net.net_utils import * class mock_netif(object): @@ -45,8 +45,8 @@ def get_name(self): import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import error -from autotest_lib.client.net import net_utils +from autotest.client.common_lib import error +from autotest.client.net import net_utils # TODO (chavey) clean up those global here and new_handle() handle_counter = 0 diff --git a/client/net/net_tc_unittest.py b/client/net/net_tc_unittest.py index 1747f480e2..07e11d0ba2 100755 --- a/client/net/net_tc_unittest.py +++ b/client/net/net_tc_unittest.py @@ -7,10 +7,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client import utils -from autotest_lib.client.net import net_tc, net_utils, net_utils_mock -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib import error +from autotest.client import utils +from autotest.client.net import net_tc, net_utils, net_utils_mock +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib import error class TestNetUtils(unittest.TestCase): def setUp(self): diff --git a/client/net/net_utils.py b/client/net/net_utils.py index 3213ed24f7..7cdd00b4d3 100644 --- a/client/net/net_utils.py +++ b/client/net/net_utils.py @@ -4,8 +4,8 @@ """ import commands, os, re, socket, sys, time, struct -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils as client_utils +from autotest.client.common_lib import error +from autotest.client import utils as client_utils import utils TIMEOUT = 10 # Used for socket timeout and barrier timeout @@ -103,7 +103,7 @@ def process_mpstat(self, mpstat_out, sample_count, loud = True): def network(): try: - from autotest_lib.client.net import site_net_utils + from autotest.client.net import site_net_utils return site_net_utils.network_utils() except Exception: return network_utils() @@ -386,7 +386,7 @@ def flush(self): def netif(name): try: - from autotest_lib.client.net import site_net_utils + from autotest.client.net import site_net_utils return site_net_utils.network_interface(name) except Exception: return network_interface(name) @@ -451,7 +451,7 @@ def get_slave_interfaces(self): def bond(): try: - from autotest_lib.client.net import site_net_utils + from autotest.client.net import site_net_utils return site_net_utils.bonding() except Exception: return bonding() @@ -745,7 +745,7 @@ def unpack(raw_frame): def ethernet_packet(): try: - from autotest_lib.client.net import site_net_utils + from autotest.client.net import site_net_utils return site_net_utils.ethernet() except Exception: return ethernet() diff --git a/client/net/net_utils_mock.py b/client/net/net_utils_mock.py index 18df920035..e3835995b5 100644 --- a/client/net/net_utils_mock.py +++ b/client/net/net_utils_mock.py @@ -5,8 +5,8 @@ """ import socket -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.net import net_utils +from autotest.client.common_lib.test_utils import mock +from autotest.client.net import net_utils def os_open(*args, **kwarg): diff --git a/client/net/net_utils_unittest.py b/client/net/net_utils_unittest.py index 67e0c915c9..8ca22e6c2d 100755 --- a/client/net/net_utils_unittest.py +++ b/client/net/net_utils_unittest.py @@ -5,9 +5,9 @@ except ImportError: import common import utils -from autotest_lib.client.net import net_utils, net_utils_mock -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib import error +from autotest.client.net import net_utils, net_utils_mock +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib import error class TestNetUtils(unittest.TestCase): diff --git a/client/optparser.py b/client/optparser.py index 9f0a273624..ab8227b445 100644 --- a/client/optparser.py +++ b/client/optparser.py @@ -5,7 +5,7 @@ import sys, optparse import common -from autotest_lib.client.cmdparser import CommandParser +from autotest.client.cmdparser import CommandParser __all__ = ['AutotestLocalOptionParser'] diff --git a/client/package.py b/client/package.py index 392996a31c..5238c06b41 100644 --- a/client/package.py +++ b/client/package.py @@ -7,8 +7,8 @@ __author__ = 'lucasmr@br.ibm.com (Lucas Meneghel Rodrigues)' import os, re, logging -from autotest_lib.client import os_dep, utils -from autotest_lib.client.common_lib import error +from autotest.client import os_dep, utils +from autotest.client.common_lib import error # As more package methods are implemented, this list grows up KNOWN_PACKAGE_MANAGERS = ['rpm', 'dpkg'] diff --git a/client/package_unittest.py b/client/package_unittest.py index f9f7656ac3..d82bd67855 100755 --- a/client/package_unittest.py +++ b/client/package_unittest.py @@ -6,8 +6,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client import package, os_dep, utils +from autotest.client.common_lib.test_utils import mock +from autotest.client import package, os_dep, utils class TestPackage(unittest.TestCase): diff --git a/client/parallel.py b/client/parallel.py index 78a02c9f8e..4825fe22c7 100644 --- a/client/parallel.py +++ b/client/parallel.py @@ -3,7 +3,7 @@ __author__ = """Copyright Andy Whitcroft 2006""" import sys, logging, os, pickle, traceback, gc, time -from autotest_lib.client.common_lib import error, utils +from autotest.client.common_lib import error, utils def fork_start(tmp, l): sys.stdout.flush() diff --git a/client/partition.py b/client/partition.py index 4e5cd5ddb0..3d1e70f893 100644 --- a/client/partition.py +++ b/client/partition.py @@ -7,8 +7,8 @@ """ import os, re, string, sys, fcntl, logging -from autotest_lib.client import os_dep, utils -from autotest_lib.client.common_lib import error +from autotest.client import os_dep, utils +from autotest.client.common_lib import error class FsOptions(object): @@ -996,6 +996,6 @@ def _remove_disk_img(self): # import a site partition module to allow it to override functions try: - from autotest_lib.client.site_partition import * + from autotest.client.site_partition import * except ImportError: pass diff --git a/client/partition_unittest.py b/client/partition_unittest.py index 0e25e2f65c..f01b794519 100755 --- a/client/partition_unittest.py +++ b/client/partition_unittest.py @@ -1,6 +1,6 @@ #!/usr/bin/python -"""Tests for autotest_lib.client.partition.""" +"""Tests for autotest.client.partition.""" __author__ = 'gps@google.com (Gregory P. Smith)' @@ -10,8 +10,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client import partition +from autotest.client.common_lib.test_utils import mock +from autotest.client import partition class FsOptions_common(object): @@ -136,28 +136,28 @@ def fake_open(filename): # non site specific code class FSOptions_base_test(FsOptions_common, unittest.TestCase): def setUp(self): - sys.modules['autotest_lib.client.site_partition'] = None + sys.modules['autotest.client.site_partition'] = None reload(partition) class get_partition_list_base_test(get_partition_list_common, unittest.TestCase): def setUp(self): - sys.modules['autotest_lib.client.site_partition'] = None + sys.modules['autotest.client.site_partition'] = None reload(partition) get_partition_list_common.setUp(self) class FSOptions_test(FsOptions_common, unittest.TestCase): def setUp(self): - if 'autotest_lib.client.site_partition' in sys.modules: - del sys.modules['autotest_lib.client.site_partition'] + if 'autotest.client.site_partition' in sys.modules: + del sys.modules['autotest.client.site_partition'] reload(partition) class get_partition_list_test(get_partition_list_common, unittest.TestCase): def setUp(self): - if 'autotest_lib.client.site_partition' in sys.modules: - del sys.modules['autotest_lib.client.site_partition'] + if 'autotest.client.site_partition' in sys.modules: + del sys.modules['autotest.client.site_partition'] reload(partition) get_partition_list_common.setUp(self) diff --git a/client/profilers/__init__.py b/client/profilers/__init__.py index a9778ba592..92ab665ae4 100644 --- a/client/profilers/__init__.py +++ b/client/profilers/__init__.py @@ -4,7 +4,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import utils, error, profiler_manager +from autotest.client.common_lib import utils, error, profiler_manager class profilers(profiler_manager.profiler_manager): @@ -20,7 +20,7 @@ def load_profiler(self, profiler, args, dargs): raise profiler_manager.ProfilerNotPresentError(profiler) profiler_module = common.setup_modules.import_module( - profiler, "autotest_lib.client.profilers.%s" % profiler) + profiler, "autotest.client.profilers.%s" % profiler) newprofiler = getattr(profiler_module, profiler)(self.job) diff --git a/client/profilers/blktrace/blktrace.py b/client/profilers/blktrace/blktrace.py index b643480641..6676fd4947 100644 --- a/client/profilers/blktrace/blktrace.py +++ b/client/profilers/blktrace/blktrace.py @@ -3,8 +3,8 @@ blktrace - generate traces of the i/o traffic on block devices """ import os -from autotest_lib.client.common_lib import error -from autotest_lib.client import profiler, utils +from autotest.client.common_lib import error +from autotest.client import profiler, utils class blktrace(profiler.profiler): diff --git a/client/profilers/catprofile/catprofile.py b/client/profilers/catprofile/catprofile.py index 7bfb830a9c..b85478242a 100644 --- a/client/profilers/catprofile/catprofile.py +++ b/client/profilers/catprofile/catprofile.py @@ -6,7 +6,7 @@ outfile=monitor, interval=1) """ import time, os -from autotest_lib.client import profiler +from autotest.client import profiler class catprofile(profiler.profiler): version = 1 diff --git a/client/profilers/cmdprofile/cmdprofile.py b/client/profilers/cmdprofile/cmdprofile.py index ecdfe063d1..67c4b74a19 100644 --- a/client/profilers/cmdprofile/cmdprofile.py +++ b/client/profilers/cmdprofile/cmdprofile.py @@ -4,8 +4,8 @@ """ import time, os, subprocess -from autotest_lib.client import profiler -from autotest_lib.client.common_lib import utils, error +from autotest.client import profiler +from autotest.client.common_lib import utils, error class cmdprofile(profiler.profiler): version = 2 diff --git a/client/profilers/cpistat/cpistat.py b/client/profilers/cpistat/cpistat.py index 557c7dc8b2..8c89d7f028 100644 --- a/client/profilers/cpistat/cpistat.py +++ b/client/profilers/cpistat/cpistat.py @@ -5,7 +5,7 @@ job.profilers.add('cpistat', interval=1) """ import time, os, subprocess -from autotest_lib.client import profiler +from autotest.client import profiler class cpistat(profiler.profiler): version = 1 diff --git a/client/profilers/ftrace/ftrace.py b/client/profilers/ftrace/ftrace.py index 450ee4b95a..f3fc243c96 100644 --- a/client/profilers/ftrace/ftrace.py +++ b/client/profilers/ftrace/ftrace.py @@ -4,8 +4,8 @@ @author: David Sharp (dhsharp@google.com) """ import logging, os, signal, time -from autotest_lib.client import profiler, utils -from autotest_lib.client.common_lib import error +from autotest.client import profiler, utils +from autotest.client.common_lib import error class ftrace(profiler.profiler): diff --git a/client/profilers/iostat/iostat.py b/client/profilers/iostat/iostat.py index 1d01f2b0bb..666051244c 100644 --- a/client/profilers/iostat/iostat.py +++ b/client/profilers/iostat/iostat.py @@ -2,8 +2,8 @@ Run iostat with a default interval of 1 second. """ import time, os, subprocess -from autotest_lib.client import profiler -from autotest_lib.client.common_lib import utils, error +from autotest.client import profiler +from autotest.client.common_lib import utils, error class iostat(profiler.profiler): diff --git a/client/profilers/kvm_modload/kvm_modload.py b/client/profilers/kvm_modload/kvm_modload.py index 5ad1bc2847..caa5fbc39c 100644 --- a/client/profilers/kvm_modload/kvm_modload.py +++ b/client/profilers/kvm_modload/kvm_modload.py @@ -7,7 +7,7 @@ """ import os, subprocess -from autotest_lib.client import kvm_control, profiler, utils +from autotest.client import kvm_control, profiler, utils class kvm_modload(profiler.profiler): diff --git a/client/profilers/kvm_stat/kvm_stat.py b/client/profilers/kvm_stat/kvm_stat.py index b9ba2a8c16..c32778d881 100644 --- a/client/profilers/kvm_stat/kvm_stat.py +++ b/client/profilers/kvm_stat/kvm_stat.py @@ -7,8 +7,8 @@ @author: Lucas Meneghel Rodrigues (lmr@redhat.com) """ import time, os, subprocess, commands, logging -from autotest_lib.client import utils, profiler, os_dep -from autotest_lib.client.common_lib import error +from autotest.client import utils, profiler, os_dep +from autotest.client.common_lib import error class kvm_stat(profiler.profiler): diff --git a/client/profilers/lockmeter/lockmeter.py b/client/profilers/lockmeter/lockmeter.py index b7bb50c6e0..7d774f9eb5 100644 --- a/client/profilers/lockmeter/lockmeter.py +++ b/client/profilers/lockmeter/lockmeter.py @@ -10,7 +10,7 @@ But read the FAQ first. """ import os -from autotest_lib.client import utils, profiler +from autotest.client import utils, profiler class lockmeter(profiler.profiler): version = 1 diff --git a/client/profilers/lttng/lttng.py b/client/profilers/lttng/lttng.py index 7861a1c9ab..0a722a5360 100644 --- a/client/profilers/lttng/lttng.py +++ b/client/profilers/lttng/lttng.py @@ -21,8 +21,8 @@ """ import os, shutil, time -from autotest_lib.client import utils, profiler -from autotest_lib.client.common_lib import error +from autotest.client import utils, profiler +from autotest.client.common_lib import error class lttng(profiler.profiler): version = 1 diff --git a/client/profilers/mpstat/mpstat.py b/client/profilers/mpstat/mpstat.py index 7396ff2e5a..8eb5edb78d 100644 --- a/client/profilers/mpstat/mpstat.py +++ b/client/profilers/mpstat/mpstat.py @@ -2,7 +2,7 @@ Sets up a subprocess to run mpstat on a specified interval, default 1 second """ import time, os, subprocess -from autotest_lib.client import profiler +from autotest.client import profiler class mpstat(profiler.profiler): diff --git a/client/profilers/oprofile/oprofile.py b/client/profilers/oprofile/oprofile.py index 13bae017af..99b5f10ae7 100644 --- a/client/profilers/oprofile/oprofile.py +++ b/client/profilers/oprofile/oprofile.py @@ -10,8 +10,8 @@ Will need some libaries to compile. Do 'apt-get build-dep oprofile' """ import os, shutil, time -from autotest_lib.client import utils, profiler -from autotest_lib.client.common_lib import error +from autotest.client import utils, profiler +from autotest.client.common_lib import error import logging class oprofile(profiler.profiler): diff --git a/client/profilers/perf/perf.py b/client/profilers/perf/perf.py index 3356653c87..3dd691f21a 100644 --- a/client/profilers/perf/perf.py +++ b/client/profilers/perf/perf.py @@ -7,7 +7,7 @@ import time, os, stat, subprocess, signal import logging -from autotest_lib.client import profiler, os_dep, utils +from autotest.client import profiler, os_dep, utils class perf(profiler.profiler): diff --git a/client/profilers/powertop/powertop.py b/client/profilers/powertop/powertop.py index 7fc0ebe002..374754d165 100644 --- a/client/profilers/powertop/powertop.py +++ b/client/profilers/powertop/powertop.py @@ -4,7 +4,7 @@ These are important questions without a good answer... until now. """ import time, os -from autotest_lib.client import utils, profiler +from autotest.client import utils, profiler class powertop(profiler.profiler): version = 1 diff --git a/client/profilers/readprofile/readprofile.py b/client/profilers/readprofile/readprofile.py index 2760d2faad..294a9300ce 100644 --- a/client/profilers/readprofile/readprofile.py +++ b/client/profilers/readprofile/readprofile.py @@ -9,8 +9,8 @@ the procedure. The output is filled with blanks to ease readability. """ import os, shutil -from autotest_lib.client import utils, profiler -from autotest_lib.client.common_lib import error +from autotest.client import utils, profiler +from autotest.client.common_lib import error class readprofile(profiler.profiler): version = 1 diff --git a/client/profilers/sar/sar.py b/client/profilers/sar/sar.py index 5d98a94f8b..2745ce1daa 100644 --- a/client/profilers/sar/sar.py +++ b/client/profilers/sar/sar.py @@ -5,7 +5,7 @@ sar -A -f """ import os, shutil, subprocess, time -from autotest_lib.client import utils, profiler, os_dep +from autotest.client import utils, profiler, os_dep class sar(profiler.profiler): diff --git a/client/profilers/vmstat/vmstat.py b/client/profilers/vmstat/vmstat.py index bb92840108..d1cff0a64b 100644 --- a/client/profilers/vmstat/vmstat.py +++ b/client/profilers/vmstat/vmstat.py @@ -5,7 +5,7 @@ job.profilers.add('vmstat', interval=1) """ import time, os, subprocess -from autotest_lib.client import profiler +from autotest.client import profiler class vmstat(profiler.profiler): diff --git a/client/self-test/extract_tarball_to_dir b/client/self-test/extract_tarball_to_dir index e4074e38a1..38cfea593a 100755 --- a/client/self-test/extract_tarball_to_dir +++ b/client/self-test/extract_tarball_to_dir @@ -3,7 +3,7 @@ import sys, os, os.path autodir = os.environ['AUTODIR'] sys.path.insert(0, autodir + '/bin') -from autotest_lib.client import utils +from autotest.client import utils os.chdir('/tmp') utils.extract_tarball_to_dir(autodir + diff --git a/client/setup.py b/client/setup.py index ba2225c3e9..80d219dfb3 100644 --- a/client/setup.py +++ b/client/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up client_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/client/setup_job.py b/client/setup_job.py index 644b0122b1..ed8c834f11 100644 --- a/client/setup_job.py +++ b/client/setup_job.py @@ -8,12 +8,12 @@ except ImportError: import common -from autotest_lib.client import client_logging_config -from autotest_lib.client import job as client_job -from autotest_lib.client.common_lib import base_job -from autotest_lib.client.common_lib import error -from autotest_lib.client.common_lib import logging_manager -from autotest_lib.client.common_lib import packages +from autotest.client import client_logging_config +from autotest.client import job as client_job +from autotest.client.common_lib import base_job +from autotest.client.common_lib import error +from autotest.client.common_lib import logging_manager +from autotest.client.common_lib import packages class setup_job(client_job.job): diff --git a/client/setup_job_unittest.py b/client/setup_job_unittest.py index b1721f66ff..42e7c0931a 100755 --- a/client/setup_job_unittest.py +++ b/client/setup_job_unittest.py @@ -6,12 +6,12 @@ except ImportError: import common -from autotest_lib.client import job, setup_job -from autotest_lib.client import utils -from autotest_lib.client.common_lib import base_job, error, log, packages -from autotest_lib.client.common_lib import logging_manager, logging_config -from autotest_lib.client.common_lib import base_job_unittest -from autotest_lib.client.common_lib.test_utils import mock, unittest +from autotest.client import job, setup_job +from autotest.client import utils +from autotest.client.common_lib import base_job, error, log, packages +from autotest.client.common_lib import logging_manager, logging_config +from autotest.client.common_lib import base_job_unittest +from autotest.client.common_lib.test_utils import mock, unittest class setup_job_test_case(unittest.TestCase): diff --git a/client/setup_modules.py b/client/setup_modules.py index 619702b940..297e4cb93e 100644 --- a/client/setup_modules.py +++ b/client/setup_modules.py @@ -123,16 +123,16 @@ def setup(base_path, root_module_name=""): or on a test machine that just has the client directories installed. """ # Hack... Any better ideas? - if (root_module_name == 'autotest_lib.client' and + if (root_module_name == 'autotest.client' and os.path.exists(os.path.join(os.path.dirname(__file__), '..', 'server'))): - root_module_name = 'autotest_lib' + root_module_name = 'autotest' base_path = os.path.abspath(os.path.join(base_path, '..')) _create_module_and_parents(root_module_name) _import_children_into_module(root_module_name, base_path) - if root_module_name == 'autotest_lib': + if root_module_name == 'autotest': # Allow locally installed third party packages to be found # before any that are installed on the system itself when not. # running as a client. diff --git a/client/setup_modules_unittest.py b/client/setup_modules_unittest.py index f017375daa..cadf56de52 100755 --- a/client/setup_modules_unittest.py +++ b/client/setup_modules_unittest.py @@ -2,7 +2,7 @@ import cStringIO, logging, os, sys, unittest -# direct imports; autotest_lib has not been setup while testing this. +# direct imports; autotest has not been setup while testing this. from common_lib.test_utils import mock import setup_modules @@ -11,7 +11,7 @@ class LoggingErrorStderrTests(unittest.TestCase): def setUp(self): autotest_dir = os.path.abspath(os.path.join(setup_modules.dirname, '..')) - setup_modules.setup(autotest_dir, root_module_name='autotest_lib') + setup_modules.setup(autotest_dir, root_module_name='autotest') self.god = mock.mock_god() self.test_stderr = cStringIO.StringIO() self.god.stub_with(sys, 'stderr', self.test_stderr) diff --git a/client/sysinfo.py b/client/sysinfo.py index a7f69d0c7b..32aae7b72b 100644 --- a/client/sysinfo.py +++ b/client/sysinfo.py @@ -1,8 +1,8 @@ -from autotest_lib.client.common_lib import utils -from autotest_lib.client import base_sysinfo +from autotest.client.common_lib import utils +from autotest.client import base_sysinfo sysinfo = utils.import_site_class(__file__, - "autotest_lib.client.site_sysinfo", + "autotest.client.site_sysinfo", "site_sysinfo", base_sysinfo.base_sysinfo) # pull in some data stucture stubs from base_sysinfo, for convenience diff --git a/client/test.py b/client/test.py index 0ef44a4387..0cebd4c4e4 100644 --- a/client/test.py +++ b/client/test.py @@ -20,9 +20,9 @@ import os, traceback, sys, shutil, logging, resource, glob -from autotest_lib.client.common_lib import error, utils -from autotest_lib.client.common_lib import test as common_test -from autotest_lib.client import sysinfo, os_dep +from autotest.client.common_lib import error, utils +from autotest.client.common_lib import test as common_test +from autotest.client import sysinfo, os_dep class test(common_test.base_test): diff --git a/client/test_config.py b/client/test_config.py index d7d5fbcc8d..4eec99e8f2 100644 --- a/client/test_config.py +++ b/client/test_config.py @@ -8,7 +8,7 @@ from StringIO import StringIO from os import path import types, re, string -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils __all__ = ['config_loader'] diff --git a/client/tests/aborttest/aborttest.py b/client/tests/aborttest/aborttest.py index 63b77d5a4d..f9cda9f731 100644 --- a/client/tests/aborttest/aborttest.py +++ b/client/tests/aborttest/aborttest.py @@ -1,5 +1,5 @@ -from autotest_lib.client.common_lib import error -from autotest_lib.client import test +from autotest.client.common_lib import error +from autotest.client import test class aborttest(test.test): version = 1 diff --git a/client/tests/aio_dio_bugs/aio_dio_bugs.py b/client/tests/aio_dio_bugs/aio_dio_bugs.py index 1da6fd149a..a7634dcad3 100644 --- a/client/tests/aio_dio_bugs/aio_dio_bugs.py +++ b/client/tests/aio_dio_bugs/aio_dio_bugs.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils # tests is a simple array of "cmd" "arguments" diff --git a/client/tests/aiostress/aiostress.py b/client/tests/aiostress/aiostress.py index 106c1abbe8..62e6f22f1d 100644 --- a/client/tests/aiostress/aiostress.py +++ b/client/tests/aiostress/aiostress.py @@ -1,7 +1,7 @@ # This requires aio headers to build. # Should work automagically out of deps now. import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class aiostress(test.test): diff --git a/client/tests/asynctest/asynctest.py b/client/tests/asynctest/asynctest.py index 7e0a8b6a9e..d2d62db2c7 100644 --- a/client/tests/asynctest/asynctest.py +++ b/client/tests/asynctest/asynctest.py @@ -1,6 +1,6 @@ import os, re, time -from autotest_lib.client import utils, test +from autotest.client import utils, test class asynctest(test.test): version = 1 diff --git a/client/tests/barriertest/barriertest.py b/client/tests/barriertest/barriertest.py index c68eca2439..9a1209d33e 100644 --- a/client/tests/barriertest/barriertest.py +++ b/client/tests/barriertest/barriertest.py @@ -1,8 +1,8 @@ # This is used directly by server/tests/barriertest/control.srv import logging, time -from autotest_lib.client import test -from autotest_lib.client.common_lib import barrier, error +from autotest.client import test +from autotest.client.common_lib import barrier, error class barriertest(test.test): diff --git a/client/tests/bash_shared_mapping/bash_shared_mapping.py b/client/tests/bash_shared_mapping/bash_shared_mapping.py index 437ca64628..4871eb524e 100644 --- a/client/tests/bash_shared_mapping/bash_shared_mapping.py +++ b/client/tests/bash_shared_mapping/bash_shared_mapping.py @@ -1,5 +1,5 @@ import signal, os -from autotest_lib.client import utils, test +from autotest.client import utils, test class bash_shared_mapping(test.test): version = 3 diff --git a/client/tests/bonnie/bonnie.py b/client/tests/bonnie/bonnie.py index 2c8cf83509..7c84df5e65 100644 --- a/client/tests/bonnie/bonnie.py +++ b/client/tests/bonnie/bonnie.py @@ -1,5 +1,5 @@ import os, re -from autotest_lib.client import test, os_dep, utils +from autotest.client import test, os_dep, utils def convert_size(values): diff --git a/client/tests/btreplay/btreplay.py b/client/tests/btreplay/btreplay.py index ac6e44ebf8..a7a1c68e1c 100644 --- a/client/tests/btreplay/btreplay.py +++ b/client/tests/btreplay/btreplay.py @@ -1,6 +1,6 @@ import time, os -from autotest_lib.client import test, os_dep, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, os_dep, utils +from autotest.client.common_lib import error class btreplay(test.test): diff --git a/client/tests/cgroup/cgroup.py b/client/tests/cgroup/cgroup.py index 1444c9e897..cdcf5cd5b6 100755 --- a/client/tests/cgroup/cgroup.py +++ b/client/tests/cgroup/cgroup.py @@ -10,8 +10,8 @@ import time from tempfile import NamedTemporaryFile -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error from cgroup_common import Cgroup, CgroupModules, get_load_per_cpu class cgroup(test.test): diff --git a/client/tests/cgroup/cgroup_common.py b/client/tests/cgroup/cgroup_common.py index 60351f94d7..b638c5e8c2 100755 --- a/client/tests/cgroup/cgroup_common.py +++ b/client/tests/cgroup/cgroup_common.py @@ -8,8 +8,8 @@ """ import logging, os, shutil, subprocess, time from tempfile import mkdtemp -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error +from autotest.client import utils +from autotest.client.common_lib import error class Cgroup(object): """ diff --git a/client/tests/compilebench/compilebench.py b/client/tests/compilebench/compilebench.py index 97d9e14c22..35df141954 100644 --- a/client/tests/compilebench/compilebench.py +++ b/client/tests/compilebench/compilebench.py @@ -1,6 +1,6 @@ import os import re -from autotest_lib.client import test, utils +from autotest.client import test, utils test_name = 'compilebench' diff --git a/client/tests/connectathon/connectathon.py b/client/tests/connectathon/connectathon.py index 73770ded5b..fad32fa069 100644 --- a/client/tests/connectathon/connectathon.py +++ b/client/tests/connectathon/connectathon.py @@ -1,6 +1,6 @@ import os, shutil, glob, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class connectathon(test.test): diff --git a/client/tests/cpu_hotplug/cpu_hotplug.py b/client/tests/cpu_hotplug/cpu_hotplug.py index 2ce458f96d..5f5f240c3f 100644 --- a/client/tests/cpu_hotplug/cpu_hotplug.py +++ b/client/tests/cpu_hotplug/cpu_hotplug.py @@ -1,6 +1,6 @@ import time, os, logging, re, sys -from autotest_lib.client import test, utils, os_dep -from autotest_lib.client.common_lib import error +from autotest.client import test, utils, os_dep +from autotest.client.common_lib import error class cpu_hotplug(test.test): version = 2 diff --git a/client/tests/cpuflags/cpuflags.py b/client/tests/cpuflags/cpuflags.py index a1736c491f..204bbf0f4b 100644 --- a/client/tests/cpuflags/cpuflags.py +++ b/client/tests/cpuflags/cpuflags.py @@ -6,9 +6,9 @@ """ import os, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client import test, utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils class cpuflags(test.test): """ diff --git a/client/tests/ctcs/ctcs.py b/client/tests/ctcs/ctcs.py index 6f5039b0ed..88da02b01d 100644 --- a/client/tests/ctcs/ctcs.py +++ b/client/tests/ctcs/ctcs.py @@ -1,6 +1,6 @@ import os, shutil, glob, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class ctcs(test.test): diff --git a/client/tests/cyclictest/cyclictest.py b/client/tests/cyclictest/cyclictest.py index 632985bb73..074739ac7b 100644 --- a/client/tests/cyclictest/cyclictest.py +++ b/client/tests/cyclictest/cyclictest.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client import test -from autotest_lib.client.common_lib import utils +from autotest.client import test +from autotest.client.common_lib import utils class cyclictest(test.test): diff --git a/client/tests/dacapo/dacapo.py b/client/tests/dacapo/dacapo.py index 78609f7f8e..7f0111628e 100644 --- a/client/tests/dacapo/dacapo.py +++ b/client/tests/dacapo/dacapo.py @@ -1,7 +1,7 @@ import os, re, logging, shutil -from autotest_lib.client import utils, package, test -from autotest_lib.client.test_config import config_loader -from autotest_lib.client.common_lib import error +from autotest.client import utils, package, test +from autotest.client.test_config import config_loader +from autotest.client.common_lib import error class dacapo(test.test): diff --git a/client/tests/dbench/dbench.py b/client/tests/dbench/dbench.py index 2701f44127..80979168e5 100644 --- a/client/tests/dbench/dbench.py +++ b/client/tests/dbench/dbench.py @@ -1,6 +1,6 @@ import os, re -from autotest_lib.client import utils, test +from autotest.client import utils, test class dbench(test.test): version = 3 diff --git a/client/tests/dbt2/dbt2.py b/client/tests/dbt2/dbt2.py index 1c60593386..9d58268010 100644 --- a/client/tests/dbt2/dbt2.py +++ b/client/tests/dbt2/dbt2.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils # Dbt-2 is a fair-use implementation of the TPC-C benchmark. The test is diff --git a/client/tests/disktest/disktest.py b/client/tests/disktest/disktest.py index aafdd98ef8..a181df8799 100644 --- a/client/tests/disktest/disktest.py +++ b/client/tests/disktest/disktest.py @@ -1,6 +1,6 @@ import os, sys, subprocess, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class disktest(test.test): diff --git a/client/tests/dma_memtest/dma_memtest.py b/client/tests/dma_memtest/dma_memtest.py index af516d846b..90931485fb 100644 --- a/client/tests/dma_memtest/dma_memtest.py +++ b/client/tests/dma_memtest/dma_memtest.py @@ -1,6 +1,6 @@ import os, time, re, subprocess, shutil, logging -from autotest_lib.client import utils, test -from autotest_lib.client.common_lib import error +from autotest.client import utils, test +from autotest.client.common_lib import error class dma_memtest(test.test): diff --git a/client/tests/ebizzy/ebizzy.py b/client/tests/ebizzy/ebizzy.py index 7be9ad3b77..b22d0943dc 100644 --- a/client/tests/ebizzy/ebizzy.py +++ b/client/tests/ebizzy/ebizzy.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client import utils, test -from autotest_lib.client.common_lib import error +from autotest.client import utils, test +from autotest.client.common_lib import error class ebizzy(test.test): version = 3 diff --git a/client/tests/error_cleanup/error_cleanup.py b/client/tests/error_cleanup/error_cleanup.py index fca6455dfa..8440ef3236 100644 --- a/client/tests/error_cleanup/error_cleanup.py +++ b/client/tests/error_cleanup/error_cleanup.py @@ -1,4 +1,4 @@ -from autotest_lib.client import test +from autotest.client import test class error_cleanup(test.test): version = 1 diff --git a/client/tests/error_initialize/error_initialize.py b/client/tests/error_initialize/error_initialize.py index 984f3f8dd7..becfa667e4 100644 --- a/client/tests/error_initialize/error_initialize.py +++ b/client/tests/error_initialize/error_initialize.py @@ -1,4 +1,4 @@ -from autotest_lib.client import test +from autotest.client import test class error_initialize(test.test): version = 1 diff --git a/client/tests/error_setup/error_setup.py b/client/tests/error_setup/error_setup.py index 4e39e1146f..34bd64587f 100644 --- a/client/tests/error_setup/error_setup.py +++ b/client/tests/error_setup/error_setup.py @@ -1,4 +1,4 @@ -from autotest_lib.client import test +from autotest.client import test class error_setup(test.test): version = 1 diff --git a/client/tests/error_test_bug/error_test_bug.py b/client/tests/error_test_bug/error_test_bug.py index 6de716c997..fc09177a78 100644 --- a/client/tests/error_test_bug/error_test_bug.py +++ b/client/tests/error_test_bug/error_test_bug.py @@ -1,5 +1,5 @@ -from autotest_lib.client.common_lib import error -from autotest_lib.client import test +from autotest.client.common_lib import error +from autotest.client import test class error_test_bug(test.test): version = 1 diff --git a/client/tests/error_test_error/error_test_error.py b/client/tests/error_test_error/error_test_error.py index 60289d6f7e..9811f41556 100644 --- a/client/tests/error_test_error/error_test_error.py +++ b/client/tests/error_test_error/error_test_error.py @@ -1,5 +1,5 @@ -from autotest_lib.client.common_lib import error -from autotest_lib.client import test +from autotest.client.common_lib import error +from autotest.client import test class error_test_error(test.test): version = 1 diff --git a/client/tests/error_test_fail/error_test_fail.py b/client/tests/error_test_fail/error_test_fail.py index 0ebef28b25..40df667b64 100644 --- a/client/tests/error_test_fail/error_test_fail.py +++ b/client/tests/error_test_fail/error_test_fail.py @@ -1,5 +1,5 @@ -from autotest_lib.client.common_lib import error -from autotest_lib.client import test +from autotest.client.common_lib import error +from autotest.client import test class error_test_fail(test.test): version = 1 diff --git a/client/tests/error_test_na/error_test_na.py b/client/tests/error_test_na/error_test_na.py index 8136d2037c..59752faeb8 100644 --- a/client/tests/error_test_na/error_test_na.py +++ b/client/tests/error_test_na/error_test_na.py @@ -1,5 +1,5 @@ -from autotest_lib.client.common_lib import error -from autotest_lib.client import test +from autotest.client.common_lib import error +from autotest.client import test class error_test_na(test.test): version = 1 diff --git a/client/tests/ffsb/ffsb.py b/client/tests/ffsb/ffsb.py index d3ca159f0d..e25d4fac75 100644 --- a/client/tests/ffsb/ffsb.py +++ b/client/tests/ffsb/ffsb.py @@ -1,6 +1,6 @@ import os, string, logging, re, random, shutil -from autotest_lib.client import test, os_dep, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, os_dep, utils +from autotest.client.common_lib import error def find_mnt_pt(path): diff --git a/client/tests/fio/fio.py b/client/tests/fio/fio.py index e18e0cc700..7bb6ef0c53 100644 --- a/client/tests/fio/fio.py +++ b/client/tests/fio/fio.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class fio(test.test): diff --git a/client/tests/flail/flail.py b/client/tests/flail/flail.py index 7e6ad8fbf8..dcdfe07c8c 100644 --- a/client/tests/flail/flail.py +++ b/client/tests/flail/flail.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class flail(test.test): diff --git a/client/tests/fs_mark/fs_mark.py b/client/tests/fs_mark/fs_mark.py index 4a619aaf70..cc031d5b0c 100644 --- a/client/tests/fs_mark/fs_mark.py +++ b/client/tests/fs_mark/fs_mark.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class fs_mark(test.test): diff --git a/client/tests/fsfuzzer/fsfuzzer.py b/client/tests/fsfuzzer/fsfuzzer.py index 80dc063c38..586e878543 100644 --- a/client/tests/fsfuzzer/fsfuzzer.py +++ b/client/tests/fsfuzzer/fsfuzzer.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class fsfuzzer(test.test): diff --git a/client/tests/fsstress/fsstress.py b/client/tests/fsstress/fsstress.py index 87e8351190..39fe81ac3d 100644 --- a/client/tests/fsstress/fsstress.py +++ b/client/tests/fsstress/fsstress.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class fsstress(test.test): diff --git a/client/tests/fsx/fsx.py b/client/tests/fsx/fsx.py index a3647c486d..3c9cd6117e 100644 --- a/client/tests/fsx/fsx.py +++ b/client/tests/fsx/fsx.py @@ -4,7 +4,7 @@ # NOTE - this should also have the ability to mount a filesystem, # run the tests, unmount it, then fsck the filesystem import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class fsx(test.test): diff --git a/client/tests/hackbench/hackbench.py b/client/tests/hackbench/hackbench.py index 860434696d..78b4ca044a 100644 --- a/client/tests/hackbench/hackbench.py +++ b/client/tests/hackbench/hackbench.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class hackbench(test.test): diff --git a/client/tests/hwclock/hwclock.py b/client/tests/hwclock/hwclock.py index 96776a9445..8ce302adb3 100644 --- a/client/tests/hwclock/hwclock.py +++ b/client/tests/hwclock/hwclock.py @@ -1,5 +1,5 @@ -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error import re, os, logging class hwclock(test.test): diff --git a/client/tests/interbench/interbench.py b/client/tests/interbench/interbench.py index f3b696ee36..aeb2732ac9 100644 --- a/client/tests/interbench/interbench.py +++ b/client/tests/interbench/interbench.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class interbench(test.test): diff --git a/client/tests/iosched_bugs/iosched_bugs.py b/client/tests/iosched_bugs/iosched_bugs.py index 5fc78e48e8..ca8b8c3618 100644 --- a/client/tests/iosched_bugs/iosched_bugs.py +++ b/client/tests/iosched_bugs/iosched_bugs.py @@ -1,7 +1,7 @@ import os, time import subprocess -from autotest_lib.client import test -from autotest_lib.client.common_lib import utils, error +from autotest.client import test +from autotest.client.common_lib import utils, error class iosched_bugs(test.test): diff --git a/client/tests/iozone/common.py b/client/tests/iozone/common.py index 77155269d6..025386c443 100644 --- a/client/tests/iozone/common.py +++ b/client/tests/iozone/common.py @@ -10,4 +10,4 @@ sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/tests/iozone/iozone.py b/client/tests/iozone/iozone.py index b20604fb0a..1861e76c2e 100644 --- a/client/tests/iozone/iozone.py +++ b/client/tests/iozone/iozone.py @@ -1,5 +1,5 @@ import os, re -from autotest_lib.client import test, utils +from autotest.client import test, utils import postprocessing diff --git a/client/tests/iozone/postprocessing.py b/client/tests/iozone/postprocessing.py index 96b093b739..c126398724 100755 --- a/client/tests/iozone/postprocessing.py +++ b/client/tests/iozone/postprocessing.py @@ -13,9 +13,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import logging_config, logging_manager -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils, os_dep +from autotest.client.common_lib import logging_config, logging_manager +from autotest.client.common_lib import error +from autotest.client import utils, os_dep _LABELS = ['file_size', 'record_size', 'write', 'rewrite', 'read', 'reread', diff --git a/client/tests/iperf/iperf.py b/client/tests/iperf/iperf.py index b57b2965e9..173c580f42 100644 --- a/client/tests/iperf/iperf.py +++ b/client/tests/iperf/iperf.py @@ -1,7 +1,7 @@ import os, re, socket, time, logging -from autotest_lib.client import test, utils -from autotest_lib.client.net import net_utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.net import net_utils +from autotest.client.common_lib import error MPSTAT_IX = 0 IPERF_IX = 1 diff --git a/client/tests/ipv6connect/ipv6connect.py b/client/tests/ipv6connect/ipv6connect.py index e4e3ddf60e..8e53c74786 100644 --- a/client/tests/ipv6connect/ipv6connect.py +++ b/client/tests/ipv6connect/ipv6connect.py @@ -1,7 +1,7 @@ import os, re, sys -from autotest_lib.client import test -from autotest_lib.client.common_lib import utils +from autotest.client import test +from autotest.client.common_lib import utils class ipv6connect(test.test): diff --git a/client/tests/isic/isic.py b/client/tests/isic/isic.py index bca3e06518..5f5a6ee386 100644 --- a/client/tests/isic/isic.py +++ b/client/tests/isic/isic.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class isic(test.test): diff --git a/client/tests/kernbench/kernbench.py b/client/tests/kernbench/kernbench.py index 1875ce991b..97a334a825 100644 --- a/client/tests/kernbench/kernbench.py +++ b/client/tests/kernbench/kernbench.py @@ -1,5 +1,5 @@ import re, pickle, os, logging -from autotest_lib.client import utils, test +from autotest.client import utils, test class kernbench(test.test): diff --git a/client/tests/kernelbuild/kernelbuild.py b/client/tests/kernelbuild/kernelbuild.py index 4903eebbf4..deb7e71614 100644 --- a/client/tests/kernelbuild/kernelbuild.py +++ b/client/tests/kernelbuild/kernelbuild.py @@ -1,4 +1,4 @@ -from autotest_lib.client import test, kernel +from autotest.client import test, kernel class kernelbuild(test.test): diff --git a/client/tests/kvm/common.py b/client/tests/kvm/common.py index 77155269d6..025386c443 100644 --- a/client/tests/kvm/common.py +++ b/client/tests/kvm/common.py @@ -10,4 +10,4 @@ sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/tests/kvm/control b/client/tests/kvm/control index 950154c294..03a1a0c205 100644 --- a/client/tests/kvm/control +++ b/client/tests/kvm/control @@ -21,8 +21,8 @@ For online docs, please refer to http://www.linux-kvm.org/page/KVM-Autotest """ import sys, os, logging -from autotest_lib.client.common_lib import cartesian_config -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import cartesian_config +from autotest.client.virt import virt_utils # set English environment (command output might be localized, need to be safe) os.environ['LANG'] = 'en_US.UTF-8' diff --git a/client/tests/kvm/control.parallel b/client/tests/kvm/control.parallel index f01b9bc177..f28e8d2b2b 100644 --- a/client/tests/kvm/control.parallel +++ b/client/tests/kvm/control.parallel @@ -156,7 +156,7 @@ if not params.get("mode") == "noinstall": # ---------------------------------------------------------- # Get test set (dictionary list) from the configuration file # ---------------------------------------------------------- -from autotest_lib.client.common_lib import cartesian_config +from autotest.client.common_lib import cartesian_config str = """ # This string will be parsed after tests.cfg. Make any desired changes to the @@ -174,8 +174,8 @@ tests = list(parser.get_dicts()) # ------------- # Run the tests # ------------- -from autotest_lib.client.virt import virt_scheduler -from autotest_lib.client import utils +from autotest.client.virt import virt_scheduler +from autotest.client import utils # total_cpus defaults to the number of CPUs reported by /proc/cpuinfo total_cpus = utils.count_cpus() diff --git a/client/tests/kvm/control.unittests b/client/tests/kvm/control.unittests index 387da56ef4..46d0cb9d20 100644 --- a/client/tests/kvm/control.unittests +++ b/client/tests/kvm/control.unittests @@ -14,8 +14,8 @@ Runs the unittests available for a given KVM build. """ import sys, os, logging -from autotest_lib.client.common_lib import cartesian_config -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import cartesian_config +from autotest.client.virt import virt_utils parser = cartesian_config.Parser() kvm_test_dir = os.path.join(os.environ['AUTODIR'],'tests/kvm') diff --git a/client/tests/kvm/get_started.py b/client/tests/kvm/get_started.py index a56ad6afa0..8f7a2d4657 100755 --- a/client/tests/kvm/get_started.py +++ b/client/tests/kvm/get_started.py @@ -9,9 +9,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import logging_manager -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import logging_manager +from autotest.client import utils +from autotest.client.virt import virt_utils test_name = "kvm" test_dir = os.path.dirname(sys.modules[__name__].__file__) diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py index 83883919a8..117d84dd19 100644 --- a/client/tests/kvm/kvm.py +++ b/client/tests/kvm/kvm.py @@ -1,4 +1,4 @@ -from autotest_lib.client.virt import virt_test +from autotest.client.virt import virt_test class kvm(virt_test.virt_test): diff --git a/client/tests/kvm/multi_host.srv b/client/tests/kvm/multi_host.srv index 23c0b24672..529f363aef 100644 --- a/client/tests/kvm/multi_host.srv +++ b/client/tests/kvm/multi_host.srv @@ -14,8 +14,8 @@ dicts for the multi host test. """ import sys, os, commands, glob, shutil, logging, random -from autotest_lib.server import utils -from autotest_lib.client.common_lib import cartesian_config, error +from autotest.server import utils +from autotest.client.common_lib import cartesian_config, error # Specify the directory of autotest before you start this test AUTOTEST_DIR = job.clientdir diff --git a/client/tests/kvm/tests/9p.py b/client/tests/kvm/tests/9p.py index dcf160dcf1..c9cbcd4f34 100644 --- a/client/tests/kvm/tests/9p.py +++ b/client/tests/kvm/tests/9p.py @@ -1,6 +1,6 @@ import os,logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils def run_9p(test, params, env): diff --git a/client/tests/kvm/tests/balloon_check.py b/client/tests/kvm/tests/balloon_check.py index fea18ae76b..040bc9e3e3 100644 --- a/client/tests/kvm/tests/balloon_check.py +++ b/client/tests/kvm/tests/balloon_check.py @@ -1,6 +1,6 @@ import re, logging, random, time -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import kvm_monitor, virt_test_utils, aexpect +from autotest.client.common_lib import error +from autotest.client.virt import kvm_monitor, virt_test_utils, aexpect def run_balloon_check(test, params, env): """ diff --git a/client/tests/kvm/tests/cdrom.py b/client/tests/kvm/tests/cdrom.py index ca7297b526..1da3d8d6a8 100644 --- a/client/tests/kvm/tests/cdrom.py +++ b/client/tests/kvm/tests/cdrom.py @@ -1,7 +1,7 @@ import logging, re, time, os -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils, aexpect, kvm_monitor +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_utils, aexpect, kvm_monitor @error.context_aware diff --git a/client/tests/kvm/tests/cgroup.py b/client/tests/kvm/tests/cgroup.py index 717ab09976..4a8abb093b 100644 --- a/client/tests/kvm/tests/cgroup.py +++ b/client/tests/kvm/tests/cgroup.py @@ -8,16 +8,16 @@ import re import time from random import random -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.tests.cgroup.cgroup_common import Cgroup -from autotest_lib.client.tests.cgroup.cgroup_common import CgroupModules -from autotest_lib.client.tests.cgroup.cgroup_common import get_load_per_cpu -from autotest_lib.client.virt.virt_env_process import preprocess -from autotest_lib.client.virt import kvm_monitor -from autotest_lib.client.virt.aexpect import ExpectTimeoutError -from autotest_lib.client.virt.aexpect import ExpectProcessTerminatedError -from autotest_lib.client.virt.aexpect import ShellTimeoutError +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.tests.cgroup.cgroup_common import Cgroup +from autotest.client.tests.cgroup.cgroup_common import CgroupModules +from autotest.client.tests.cgroup.cgroup_common import get_load_per_cpu +from autotest.client.virt.virt_env_process import preprocess +from autotest.client.virt import kvm_monitor +from autotest.client.virt.aexpect import ExpectTimeoutError +from autotest.client.virt.aexpect import ExpectProcessTerminatedError +from autotest.client.virt.aexpect import ShellTimeoutError @error.context_aware diff --git a/client/tests/kvm/tests/cpu_hotplug.py b/client/tests/kvm/tests/cpu_hotplug.py index c2faaf72d7..0adcbe52f8 100644 --- a/client/tests/kvm/tests/cpu_hotplug.py +++ b/client/tests/kvm/tests/cpu_hotplug.py @@ -1,6 +1,6 @@ import os, logging, re -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils @error.context_aware diff --git a/client/tests/kvm/tests/cpuflags.py b/client/tests/kvm/tests/cpuflags.py index 7e8cb49cb8..5c11ab006b 100644 --- a/client/tests/kvm/tests/cpuflags.py +++ b/client/tests/kvm/tests/cpuflags.py @@ -1,7 +1,7 @@ import logging, re, random, os, time, socket, pickle, sys, traceback -from autotest_lib.client.common_lib import error, utils -from autotest_lib.client.virt import kvm_vm -from autotest_lib.client.virt import virt_utils, aexpect +from autotest.client.common_lib import error, utils +from autotest.client.virt import kvm_vm +from autotest.client.virt import virt_utils, aexpect def run_cpuflags(test, params, env): diff --git a/client/tests/kvm/tests/enospc.py b/client/tests/kvm/tests/enospc.py index 641dff0a51..a3701a0d01 100644 --- a/client/tests/kvm/tests/enospc.py +++ b/client/tests/kvm/tests/enospc.py @@ -1,7 +1,7 @@ import logging, time, re, os -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_vm, virt_utils +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_vm, virt_utils class EnospcConfig(object): diff --git a/client/tests/kvm/tests/floppy.py b/client/tests/kvm/tests/floppy.py index 2ac01d2bac..25211bdd5b 100644 --- a/client/tests/kvm/tests/floppy.py +++ b/client/tests/kvm/tests/floppy.py @@ -1,6 +1,6 @@ import logging, time, os -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils @error.context_aware diff --git a/client/tests/kvm/tests/getfd.py b/client/tests/kvm/tests/getfd.py index 9022998b97..305edc783b 100644 --- a/client/tests/kvm/tests/getfd.py +++ b/client/tests/kvm/tests/getfd.py @@ -1,6 +1,6 @@ import os import logging -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def run_getfd(test, params, env): diff --git a/client/tests/kvm/tests/hdparm.py b/client/tests/kvm/tests/hdparm.py index 388049afbe..ec1f723696 100644 --- a/client/tests/kvm/tests/hdparm.py +++ b/client/tests/kvm/tests/hdparm.py @@ -1,5 +1,5 @@ import re, logging -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error @error.context_aware diff --git a/client/tests/kvm/tests/ksm_overcommit.py b/client/tests/kvm/tests/ksm_overcommit.py index 0a8b687b54..1c9ddec485 100644 --- a/client/tests/kvm/tests/ksm_overcommit.py +++ b/client/tests/kvm/tests/ksm_overcommit.py @@ -1,8 +1,8 @@ import logging, time, random, math, os -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils, virt_test_utils, aexpect -from autotest_lib.client.virt import virt_env_process +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_utils, virt_test_utils, aexpect +from autotest.client.virt import virt_env_process def run_ksm_overcommit(test, params, env): diff --git a/client/tests/kvm/tests/migration.py b/client/tests/kvm/tests/migration.py index 6d47edb7f1..f8031a32d5 100644 --- a/client/tests/kvm/tests/migration.py +++ b/client/tests/kvm/tests/migration.py @@ -1,6 +1,6 @@ import logging, time, types -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils def run_migration(test, params, env): diff --git a/client/tests/kvm/tests/migration_multi_host.py b/client/tests/kvm/tests/migration_multi_host.py index 2dcb0981f9..187c0a089c 100644 --- a/client/tests/kvm/tests/migration_multi_host.py +++ b/client/tests/kvm/tests/migration_multi_host.py @@ -1,4 +1,4 @@ -from autotest_lib.client.virt import virt_utils +from autotest.client.virt import virt_utils def run_migration_multi_host(test, params, env): diff --git a/client/tests/kvm/tests/migration_with_file_transfer.py b/client/tests/kvm/tests/migration_with_file_transfer.py index 0b4a616735..a80a55916a 100644 --- a/client/tests/kvm/tests/migration_with_file_transfer.py +++ b/client/tests/kvm/tests/migration_with_file_transfer.py @@ -1,7 +1,7 @@ import logging, time, os -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client import utils as client_utils -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import utils, error +from autotest.client import utils as client_utils +from autotest.client.virt import virt_utils @error.context_aware diff --git a/client/tests/kvm/tests/migration_with_reboot.py b/client/tests/kvm/tests/migration_with_reboot.py index 6ee2da5e21..544087f1ee 100644 --- a/client/tests/kvm/tests/migration_with_reboot.py +++ b/client/tests/kvm/tests/migration_with_reboot.py @@ -1,4 +1,4 @@ -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils def run_migration_with_reboot(test, params, env): diff --git a/client/tests/kvm/tests/multi_disk.py b/client/tests/kvm/tests/multi_disk.py index 74796e5fc2..572f2b3f3b 100644 --- a/client/tests/kvm/tests/multi_disk.py +++ b/client/tests/kvm/tests/multi_disk.py @@ -1,6 +1,6 @@ import logging, re, random -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_env_process +from autotest.client.common_lib import error +from autotest.client.virt import virt_env_process @error.context_aware diff --git a/client/tests/kvm/tests/nic_bonding.py b/client/tests/kvm/tests/nic_bonding.py index d1f1732def..7f3c626f89 100644 --- a/client/tests/kvm/tests/nic_bonding.py +++ b/client/tests/kvm/tests/nic_bonding.py @@ -1,7 +1,7 @@ import logging, time -from autotest_lib.client.virt.tests import file_transfer -from autotest_lib.client.virt import virt_test_utils, aexpect -from autotest_lib.client.common_lib import error, utils +from autotest.client.virt.tests import file_transfer +from autotest.client.virt import virt_test_utils, aexpect +from autotest.client.common_lib import error, utils def run_nic_bonding(test, params, env): diff --git a/client/tests/kvm/tests/nic_hotplug.py b/client/tests/kvm/tests/nic_hotplug.py index 7a35a51268..debe09a472 100644 --- a/client/tests/kvm/tests/nic_hotplug.py +++ b/client/tests/kvm/tests/nic_hotplug.py @@ -1,6 +1,6 @@ import logging, os -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils, virt_utils, aexpect +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils, virt_utils, aexpect def run_nic_hotplug(test, params, env): diff --git a/client/tests/kvm/tests/nmi_watchdog.py b/client/tests/kvm/tests/nmi_watchdog.py index a4b2349515..a78ffe992a 100644 --- a/client/tests/kvm/tests/nmi_watchdog.py +++ b/client/tests/kvm/tests/nmi_watchdog.py @@ -1,5 +1,5 @@ import time, logging -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error @error.context_aware diff --git a/client/tests/kvm/tests/pci_hotplug.py b/client/tests/kvm/tests/pci_hotplug.py index c53edac126..ad0c9898f7 100644 --- a/client/tests/kvm/tests/pci_hotplug.py +++ b/client/tests/kvm/tests/pci_hotplug.py @@ -1,6 +1,6 @@ import re -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, virt_vm, aexpect +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, virt_vm, aexpect def run_pci_hotplug(test, params, env): diff --git a/client/tests/kvm/tests/physical_resources_check.py b/client/tests/kvm/tests/physical_resources_check.py index 4e838148e0..a26362241c 100644 --- a/client/tests/kvm/tests/physical_resources_check.py +++ b/client/tests/kvm/tests/physical_resources_check.py @@ -1,6 +1,6 @@ import re, string, logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import kvm_monitor, virt_vm +from autotest.client.common_lib import error +from autotest.client.virt import kvm_monitor, virt_vm def run_physical_resources_check(test, params, env): diff --git a/client/tests/kvm/tests/qemu_img.py b/client/tests/kvm/tests/qemu_img.py index bc2f4b39d8..130711d29f 100644 --- a/client/tests/kvm/tests/qemu_img.py +++ b/client/tests/kvm/tests/qemu_img.py @@ -1,6 +1,6 @@ import re, os, logging, commands -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client.virt import virt_vm, virt_utils, virt_env_process +from autotest.client.common_lib import utils, error +from autotest.client.virt import virt_vm, virt_utils, virt_env_process def run_qemu_img(test, params, env): diff --git a/client/tests/kvm/tests/qemu_io_blkdebug.py b/client/tests/kvm/tests/qemu_io_blkdebug.py index 920d546928..c9478eb982 100644 --- a/client/tests/kvm/tests/qemu_io_blkdebug.py +++ b/client/tests/kvm/tests/qemu_io_blkdebug.py @@ -1,9 +1,9 @@ import re, logging, ConfigParser -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import qemu_io -from autotest_lib.client.virt import virt_vm -from autotest_lib.client.virt import virt_utils -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client.virt import qemu_io +from autotest.client.virt import virt_vm +from autotest.client.virt import virt_utils +from autotest.client import utils @error.context_aware def run_qemu_io_blkdebug(test, params, env): diff --git a/client/tests/kvm/tests/qemu_iotests.py b/client/tests/kvm/tests/qemu_iotests.py index 1dcbac3655..ca252f6e73 100644 --- a/client/tests/kvm/tests/qemu_iotests.py +++ b/client/tests/kvm/tests/qemu_iotests.py @@ -1,7 +1,7 @@ import os -from autotest_lib.client.common_lib import git, error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import git, error +from autotest.client import utils +from autotest.client.virt import virt_utils @error.context_aware diff --git a/client/tests/kvm/tests/qmp_basic.py b/client/tests/kvm/tests/qmp_basic.py index a8c84ac994..bad1865e11 100644 --- a/client/tests/kvm/tests/qmp_basic.py +++ b/client/tests/kvm/tests/qmp_basic.py @@ -1,5 +1,5 @@ -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import kvm_monitor +from autotest.client.common_lib import error +from autotest.client.virt import kvm_monitor def run_qmp_basic(test, params, env): diff --git a/client/tests/kvm/tests/qmp_basic_rhel6.py b/client/tests/kvm/tests/qmp_basic_rhel6.py index b4e5ea609a..66af7c8902 100644 --- a/client/tests/kvm/tests/qmp_basic_rhel6.py +++ b/client/tests/kvm/tests/qmp_basic_rhel6.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import kvm_monitor +from autotest.client.common_lib import error +from autotest.client.virt import kvm_monitor def run_qmp_basic_rhel6(test, params, env): diff --git a/client/tests/kvm/tests/set_link.py b/client/tests/kvm/tests/set_link.py index f50dc931df..194826e937 100644 --- a/client/tests/kvm/tests/set_link.py +++ b/client/tests/kvm/tests/set_link.py @@ -1,7 +1,7 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt.tests import file_transfer -from autotest_lib.client.virt import virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt.tests import file_transfer +from autotest.client.virt import virt_test_utils def run_set_link(test, params, env): diff --git a/client/tests/kvm/tests/smbios_table.py b/client/tests/kvm/tests/smbios_table.py index 5d5a1adf0b..177d87a53b 100644 --- a/client/tests/kvm/tests/smbios_table.py +++ b/client/tests/kvm/tests/smbios_table.py @@ -1,6 +1,6 @@ import commands, logging -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client.virt import virt_env_process, virt_test_utils +from autotest.client.common_lib import utils, error +from autotest.client.virt import virt_env_process, virt_test_utils @error.context_aware diff --git a/client/tests/kvm/tests/stepmaker.py b/client/tests/kvm/tests/stepmaker.py index 31282e99c1..3b48791e81 100755 --- a/client/tests/kvm/tests/stepmaker.py +++ b/client/tests/kvm/tests/stepmaker.py @@ -12,9 +12,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, ppm_utils, virt_step_editor -from autotest_lib.client.virt import kvm_monitor +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, ppm_utils, virt_step_editor +from autotest.client.virt import kvm_monitor pygtk.require('2.0') diff --git a/client/tests/kvm/tests/steps.py b/client/tests/kvm/tests/steps.py index 6e1edac050..0bbb624c20 100644 --- a/client/tests/kvm/tests/steps.py +++ b/client/tests/kvm/tests/steps.py @@ -5,8 +5,8 @@ """ import os, time, shutil, logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, ppm_utils, kvm_monitor +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, ppm_utils, kvm_monitor try: import PIL.Image diff --git a/client/tests/kvm/tests/stop_continue.py b/client/tests/kvm/tests/stop_continue.py index 62df48e9fb..aa687e7b81 100644 --- a/client/tests/kvm/tests/stop_continue.py +++ b/client/tests/kvm/tests/stop_continue.py @@ -1,5 +1,5 @@ import logging -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def run_stop_continue(test, params, env): diff --git a/client/tests/kvm/tests/system_reset_bootable.py b/client/tests/kvm/tests/system_reset_bootable.py index 54536dcfaa..35d936b5da 100644 --- a/client/tests/kvm/tests/system_reset_bootable.py +++ b/client/tests/kvm/tests/system_reset_bootable.py @@ -1,5 +1,5 @@ import logging, time -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def run_system_reset_bootable(test, params, env): """ diff --git a/client/tests/kvm/tests/timedrift.py b/client/tests/kvm/tests/timedrift.py index 123a111e6f..d2549fd6af 100644 --- a/client/tests/kvm/tests/timedrift.py +++ b/client/tests/kvm/tests/timedrift.py @@ -1,6 +1,6 @@ import logging, time, commands -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils, aexpect +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils, aexpect def run_timedrift(test, params, env): diff --git a/client/tests/kvm/tests/timedrift_with_migration.py b/client/tests/kvm/tests/timedrift_with_migration.py index eb4cb4a115..c2d10fdda8 100644 --- a/client/tests/kvm/tests/timedrift_with_migration.py +++ b/client/tests/kvm/tests/timedrift_with_migration.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils def run_timedrift_with_migration(test, params, env): diff --git a/client/tests/kvm/tests/timedrift_with_reboot.py b/client/tests/kvm/tests/timedrift_with_reboot.py index 256216330f..4dbec1b751 100644 --- a/client/tests/kvm/tests/timedrift_with_reboot.py +++ b/client/tests/kvm/tests/timedrift_with_reboot.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils def run_timedrift_with_reboot(test, params, env): diff --git a/client/tests/kvm/tests/timedrift_with_stop.py b/client/tests/kvm/tests/timedrift_with_stop.py index c2b040297e..5fa6ed99e6 100644 --- a/client/tests/kvm/tests/timedrift_with_stop.py +++ b/client/tests/kvm/tests/timedrift_with_stop.py @@ -1,6 +1,6 @@ import logging, time -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils def run_timedrift_with_stop(test, params, env): diff --git a/client/tests/kvm/tests/unittest.py b/client/tests/kvm/tests/unittest.py index 16168fe729..f50e913506 100644 --- a/client/tests/kvm/tests/unittest.py +++ b/client/tests/kvm/tests/unittest.py @@ -1,6 +1,6 @@ import logging, os, shutil, glob, ConfigParser -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, virt_env_process +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, virt_env_process def run_unittest(test, params, env): diff --git a/client/tests/kvm/tests/unittest_kvmctl.py b/client/tests/kvm/tests/unittest_kvmctl.py index 046cd5345b..3ba9879820 100644 --- a/client/tests/kvm/tests/unittest_kvmctl.py +++ b/client/tests/kvm/tests/unittest_kvmctl.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error +from autotest.client import utils +from autotest.client.common_lib import error def run_unittest_kvmctl(test, params, env): diff --git a/client/tests/kvm/tests/usb.py b/client/tests/kvm/tests/usb.py index 147273312d..a79b07d380 100644 --- a/client/tests/kvm/tests/usb.py +++ b/client/tests/kvm/tests/usb.py @@ -1,5 +1,5 @@ import logging, os, re, uuid -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error @error.context_aware diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py index 141b078fc9..2227b23db1 100644 --- a/client/tests/kvm/tests/virtio_console.py +++ b/client/tests/kvm/tests/virtio_console.py @@ -8,10 +8,10 @@ from collections import deque from threading import Thread -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils, virt_test_utils, kvm_monitor -from autotest_lib.client.virt import virt_env_process, aexpect +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_utils, virt_test_utils, kvm_monitor +from autotest.client.virt import virt_env_process, aexpect def run_virtio_console(test, params, env): diff --git a/client/tests/kvm/tests/vmstop.py b/client/tests/kvm/tests/vmstop.py index fde35015c9..ecfb585f6d 100644 --- a/client/tests/kvm/tests/vmstop.py +++ b/client/tests/kvm/tests/vmstop.py @@ -1,6 +1,6 @@ import logging, time, os -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils def run_vmstop(test, params, env): diff --git a/client/tests/libhugetlbfs/libhugetlbfs.py b/client/tests/libhugetlbfs/libhugetlbfs.py index b19198758b..22ce21cdac 100644 --- a/client/tests/libhugetlbfs/libhugetlbfs.py +++ b/client/tests/libhugetlbfs/libhugetlbfs.py @@ -1,6 +1,6 @@ import re, os -from autotest_lib.client import utils, test -from autotest_lib.client.common_lib import error +from autotest.client import utils, test +from autotest.client.common_lib import error class libhugetlbfs(test.test): version = 6 diff --git a/client/tests/libvirt/common.py b/client/tests/libvirt/common.py index ce78b85930..320a06f850 100644 --- a/client/tests/libvirt/common.py +++ b/client/tests/libvirt/common.py @@ -5,4 +5,4 @@ import setup_modules sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/tests/libvirt/control b/client/tests/libvirt/control index eab4f73a9c..69b590eff1 100644 --- a/client/tests/libvirt/control +++ b/client/tests/libvirt/control @@ -16,8 +16,8 @@ libvirt code. """ import sys, os, logging -from autotest_lib.client.common_lib import cartesian_config -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import cartesian_config +from autotest.client.virt import virt_utils # set English environment (command output might be localized, need to be safe) os.environ['LANG'] = 'en_US.UTF-8' diff --git a/client/tests/libvirt/get_started.py b/client/tests/libvirt/get_started.py index 49f79373eb..351c4281e6 100755 --- a/client/tests/libvirt/get_started.py +++ b/client/tests/libvirt/get_started.py @@ -6,7 +6,7 @@ """ import os, sys import common -from autotest_lib.client.virt import virt_utils +from autotest.client.virt import virt_utils test_name = "libvirt" test_dir = os.path.dirname(sys.modules[__name__].__file__) diff --git a/client/tests/libvirt/libvirt.py b/client/tests/libvirt/libvirt.py index ac9f9196aa..1e27f439cd 100644 --- a/client/tests/libvirt/libvirt.py +++ b/client/tests/libvirt/libvirt.py @@ -1,4 +1,4 @@ -from autotest_lib.client.virt import virt_test +from autotest.client.virt import virt_test class libvirt(virt_test.virt_test): """ diff --git a/client/tests/libvirt/tests/virsh_capabilities.py b/client/tests/libvirt/tests/virsh_capabilities.py index f12fab16eb..379b51b905 100644 --- a/client/tests/libvirt/tests/virsh_capabilities.py +++ b/client/tests/libvirt/tests/virsh_capabilities.py @@ -1,7 +1,7 @@ import logging, commands, re from xml.dom.minidom import parse, parseString -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client.virt import libvirt_vm +from autotest.client.common_lib import utils, error +from autotest.client.virt import libvirt_vm def run_virsh_capabilities(test, params, env): """ diff --git a/client/tests/libvirt/tests/virsh_hostname.py b/client/tests/libvirt/tests/virsh_hostname.py index d22a7252cb..39ab426d71 100644 --- a/client/tests/libvirt/tests/virsh_hostname.py +++ b/client/tests/libvirt/tests/virsh_hostname.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client.virt import libvirt_vm +from autotest.client.common_lib import utils, error +from autotest.client.virt import libvirt_vm def run_virsh_hostname(test, params, env): """ diff --git a/client/tests/libvirt/tests/virsh_migrate.py b/client/tests/libvirt/tests/virsh_migrate.py index 947fb33ddc..861eaff82f 100644 --- a/client/tests/libvirt/tests/virsh_migrate.py +++ b/client/tests/libvirt/tests/virsh_migrate.py @@ -1,5 +1,5 @@ import logging, time -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def run_virsh_migrate(test, params, env): """ diff --git a/client/tests/libvirt/tests/virsh_uri.py b/client/tests/libvirt/tests/virsh_uri.py index 44692258c9..b92c18c46b 100644 --- a/client/tests/libvirt/tests/virsh_uri.py +++ b/client/tests/libvirt/tests/virsh_uri.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client.virt import libvirt_vm +from autotest.client.common_lib import utils, error +from autotest.client.virt import libvirt_vm def run_virsh_uri(test, params, env): """ diff --git a/client/tests/libvirt/tests/virsh_version.py b/client/tests/libvirt/tests/virsh_version.py index c1d5794b4c..831e026ba0 100644 --- a/client/tests/libvirt/tests/virsh_version.py +++ b/client/tests/libvirt/tests/virsh_version.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import utils, error -from autotest_lib.client.virt import libvirt_vm +from autotest.client.common_lib import utils, error +from autotest.client.virt import libvirt_vm def run_virsh_version(test, params, env): """ diff --git a/client/tests/libvirt_tck/libvirt_tck.py b/client/tests/libvirt_tck/libvirt_tck.py index 4b32ac0ed8..ab95a07413 100644 --- a/client/tests/libvirt_tck/libvirt_tck.py +++ b/client/tests/libvirt_tck/libvirt_tck.py @@ -1,7 +1,7 @@ import os, re, shutil, logging -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils, test +from autotest.client.common_lib import error +from autotest.client import utils, test class libvirt_tck(test.test): diff --git a/client/tests/libvirt_test_api/libvirt_test_api.py b/client/tests/libvirt_test_api/libvirt_test_api.py index ff84e8bd3a..4d9352c5e4 100644 --- a/client/tests/libvirt_test_api/libvirt_test_api.py +++ b/client/tests/libvirt_test_api/libvirt_test_api.py @@ -1,7 +1,7 @@ import os, re, shutil, glob, logging -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils, test, os_dep +from autotest.client.common_lib import error +from autotest.client import utils, test, os_dep class libvirt_test_api(test.test): diff --git a/client/tests/linus_stress/linus_stress.py b/client/tests/linus_stress/linus_stress.py index b8dfd86e17..e51dcde323 100644 --- a/client/tests/linus_stress/linus_stress.py +++ b/client/tests/linus_stress/linus_stress.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class linus_stress(test.test): diff --git a/client/tests/lmbench/lmbench.py b/client/tests/lmbench/lmbench.py index f33a6a5ce2..0beb0e7f5a 100644 --- a/client/tests/lmbench/lmbench.py +++ b/client/tests/lmbench/lmbench.py @@ -1,7 +1,7 @@ # This will need more work on the configuration stuff before it will function import os -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class lmbench(test.test): diff --git a/client/tests/lsb_dtk/lsb_dtk.py b/client/tests/lsb_dtk/lsb_dtk.py index d14268abe2..9f5ca99589 100644 --- a/client/tests/lsb_dtk/lsb_dtk.py +++ b/client/tests/lsb_dtk/lsb_dtk.py @@ -1,7 +1,7 @@ import os, glob, re, logging -from autotest_lib.client import test, utils, package -from autotest_lib.client.test_config import config_loader -from autotest_lib.client.common_lib import error +from autotest.client import test, utils, package +from autotest.client.test_config import config_loader +from autotest.client.common_lib import error class lsb_dtk(test.test): """ diff --git a/client/tests/ltp/ltp-diff.py b/client/tests/ltp/ltp-diff.py index f02fbf80df..6eb4ff3928 100755 --- a/client/tests/ltp/ltp-diff.py +++ b/client/tests/ltp/ltp-diff.py @@ -15,7 +15,7 @@ import sys, string, re -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils def usage(): print "\nUsage: \n\ diff --git a/client/tests/ltp/ltp.py b/client/tests/ltp/ltp.py index 36db6fce6b..03e7a5e8aa 100644 --- a/client/tests/ltp/ltp.py +++ b/client/tests/ltp/ltp.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client import utils, test -from autotest_lib.client.common_lib import error +from autotest.client import utils, test +from autotest.client.common_lib import error class ltp(test.test): version = 7 diff --git a/client/tests/memory_api/memory_api.py b/client/tests/memory_api/memory_api.py index 7ec3e5c721..4ec000a64c 100644 --- a/client/tests/memory_api/memory_api.py +++ b/client/tests/memory_api/memory_api.py @@ -1,6 +1,6 @@ import os, subprocess, re, commands, logging -from autotest_lib.client import utils, test -from autotest_lib.client.common_lib import error +from autotest.client import utils, test +from autotest.client.common_lib import error class memory_api(test.test): version = 1 diff --git a/client/tests/monotonic_time/monotonic_time.py b/client/tests/monotonic_time/monotonic_time.py index d5e099d32f..60d5471082 100644 --- a/client/tests/monotonic_time/monotonic_time.py +++ b/client/tests/monotonic_time/monotonic_time.py @@ -1,6 +1,6 @@ import os, re, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class monotonic_time(test.test): version = 1 diff --git a/client/tests/netperf2/netperf2.py b/client/tests/netperf2/netperf2.py index e5f696e394..be6759ec25 100644 --- a/client/tests/netperf2/netperf2.py +++ b/client/tests/netperf2/netperf2.py @@ -1,7 +1,7 @@ import os, time, re, logging -from autotest_lib.client import test, utils -from autotest_lib.client.net import net_utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.net import net_utils +from autotest.client.common_lib import error MPSTAT_IX = 0 NETPERF_IX = 1 diff --git a/client/tests/netpipe/netpipe.py b/client/tests/netpipe/netpipe.py index 9aca048722..0626f0e4e4 100644 --- a/client/tests/netpipe/netpipe.py +++ b/client/tests/netpipe/netpipe.py @@ -1,6 +1,6 @@ import os, time, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class netpipe(test.test): diff --git a/client/tests/npb/npb.py b/client/tests/npb/npb.py index def83b742c..72cf94fc85 100644 --- a/client/tests/npb/npb.py +++ b/client/tests/npb/npb.py @@ -1,6 +1,6 @@ import os, shutil, logging, re -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class npb(test.test): """ diff --git a/client/tests/parallel_dd/parallel_dd.py b/client/tests/parallel_dd/parallel_dd.py index 516e076bf2..9187941047 100644 --- a/client/tests/parallel_dd/parallel_dd.py +++ b/client/tests/parallel_dd/parallel_dd.py @@ -1,6 +1,6 @@ import os, re, time, subprocess, sys, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class parallel_dd(test.test): diff --git a/client/tests/perfmon/perfmon.py b/client/tests/perfmon/perfmon.py index 8a06df6313..fa67603200 100644 --- a/client/tests/perfmon/perfmon.py +++ b/client/tests/perfmon/perfmon.py @@ -1,6 +1,6 @@ import os, re -from autotest_lib.client import utils, test -from autotest_lib.client.common_lib import error +from autotest.client import utils, test +from autotest.client.common_lib import error # test requires at least 2.6.26, will skip otherwise (check is internal) class perfmon(test.test): diff --git a/client/tests/pi_tests/pi_tests.py b/client/tests/pi_tests/pi_tests.py index a055fdbaa2..43bf995891 100644 --- a/client/tests/pi_tests/pi_tests.py +++ b/client/tests/pi_tests/pi_tests.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class pi_tests(test.test): diff --git a/client/tests/pktgen/pktgen.py b/client/tests/pktgen/pktgen.py index 22e7fa654a..05de7a88fc 100644 --- a/client/tests/pktgen/pktgen.py +++ b/client/tests/pktgen/pktgen.py @@ -1,6 +1,6 @@ import os, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class pktgen(test.test): diff --git a/client/tests/posixtest/posixtest.py b/client/tests/posixtest/posixtest.py index a228f858f8..7f77b5096e 100644 --- a/client/tests/posixtest/posixtest.py +++ b/client/tests/posixtest/posixtest.py @@ -1,7 +1,7 @@ # POSIX test suite wrapper class. More information about the suite can be found # at http://posixtest.sourceforge.net/ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils __author__ = '''mohd.omar@in.ibm.com (Mohammed Omar)''' diff --git a/client/tests/profiler_sync/profiler_sync.py b/client/tests/profiler_sync/profiler_sync.py index 5f17d9cca3..5e8b44e3cb 100644 --- a/client/tests/profiler_sync/profiler_sync.py +++ b/client/tests/profiler_sync/profiler_sync.py @@ -1,9 +1,9 @@ -# This "test" is used by autotest_lib.server.standalone_profilers to start +# This "test" is used by autotest.server.standalone_profilers to start # and stop profilers on a collection of hosts at approximately the same # time by synchronizing using barriers. -from autotest_lib.client import test -from autotest_lib.client.common_lib import barrier +from autotest.client import test +from autotest.client.common_lib import barrier class profiler_sync(test.test): version = 1 diff --git a/client/tests/profiler_test/profiler_test.py b/client/tests/profiler_test/profiler_test.py index 5ddfe6eb3b..51ab883296 100644 --- a/client/tests/profiler_test/profiler_test.py +++ b/client/tests/profiler_test/profiler_test.py @@ -1,6 +1,6 @@ import time -from autotest_lib.client.common_lib import error -from autotest_lib.client import test, utils +from autotest.client.common_lib import error +from autotest.client import test, utils class profiler_test(test.test): diff --git a/client/tests/qemu_iotests/qemu_iotests.py b/client/tests/qemu_iotests/qemu_iotests.py index 2fded88463..e6d187e954 100644 --- a/client/tests/qemu_iotests/qemu_iotests.py +++ b/client/tests/qemu_iotests/qemu_iotests.py @@ -1,6 +1,6 @@ import os, re, logging -from autotest_lib.client import test, utils, os_dep -from autotest_lib.client.common_lib import error +from autotest.client import test, utils, os_dep +from autotest.client.common_lib import error class qemu_iotests(test.test): diff --git a/client/tests/reaim/reaim.py b/client/tests/reaim/reaim.py index 8e28f82353..7fa92afece 100644 --- a/client/tests/reaim/reaim.py +++ b/client/tests/reaim/reaim.py @@ -1,6 +1,6 @@ # Needs autoconf & automake & libtool to be installed. Ewwwwwwwwwwwwwwwwwwwwww import re, os -from autotest_lib.client import test, utils, os_dep +from autotest.client import test, utils, os_dep class reaim(test.test): diff --git a/client/tests/real_time_tests/real_time_tests.py b/client/tests/real_time_tests/real_time_tests.py index c902dff241..c0b02beee9 100644 --- a/client/tests/real_time_tests/real_time_tests.py +++ b/client/tests/real_time_tests/real_time_tests.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class real_time_tests(test.test): version = 1 diff --git a/client/tests/rmaptest/rmaptest.py b/client/tests/rmaptest/rmaptest.py index ff36b4e4c2..aae64b66b9 100644 --- a/client/tests/rmaptest/rmaptest.py +++ b/client/tests/rmaptest/rmaptest.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils # tests is a simple array of "cmd" "arguments" diff --git a/client/tests/rtc/rtc.py b/client/tests/rtc/rtc.py index 6a59a579c3..7999f1dd2b 100644 --- a/client/tests/rtc/rtc.py +++ b/client/tests/rtc/rtc.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class rtc(test.test): version = 1 diff --git a/client/tests/rttester/rttester.py b/client/tests/rttester/rttester.py index c6cdb19045..1805d57472 100644 --- a/client/tests/rttester/rttester.py +++ b/client/tests/rttester/rttester.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils, os_dep +from autotest.client import test, utils, os_dep class rttester(test.test): diff --git a/client/tests/scrashme/scrashme.py b/client/tests/scrashme/scrashme.py index 4b3558c891..6ab8175a62 100644 --- a/client/tests/scrashme/scrashme.py +++ b/client/tests/scrashme/scrashme.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class scrashme(test.test): diff --git a/client/tests/selftest/selftest.py b/client/tests/selftest/selftest.py index b25a0d4266..a96079362a 100644 --- a/client/tests/selftest/selftest.py +++ b/client/tests/selftest/selftest.py @@ -1,6 +1,6 @@ import os, sys, logging -from autotest_lib.client import test -from autotest_lib.client.common_lib import error +from autotest.client import test +from autotest.client.common_lib import error class selftest(test.test): diff --git a/client/tests/signaltest/signaltest.py b/client/tests/signaltest/signaltest.py index 4db036d19f..8f13f3851b 100644 --- a/client/tests/signaltest/signaltest.py +++ b/client/tests/signaltest/signaltest.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client import test -from autotest_lib.client.common_lib import utils +from autotest.client import test +from autotest.client.common_lib import utils class signaltest(test.test): diff --git a/client/tests/sleeptest/sleeptest.py b/client/tests/sleeptest/sleeptest.py index dafe0ca727..f1b42a0d22 100644 --- a/client/tests/sleeptest/sleeptest.py +++ b/client/tests/sleeptest/sleeptest.py @@ -1,5 +1,5 @@ import time -from autotest_lib.client import test +from autotest.client import test class sleeptest(test.test): version = 1 diff --git a/client/tests/sparse/sparse.py b/client/tests/sparse/sparse.py index 7c271574c2..752e16dc74 100644 --- a/client/tests/sparse/sparse.py +++ b/client/tests/sparse/sparse.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils, kernel +from autotest.client import test, utils, kernel class sparse(test.test): diff --git a/client/tests/spew/spew.py b/client/tests/spew/spew.py index ff2516a0c2..9374144e20 100644 --- a/client/tests/spew/spew.py +++ b/client/tests/spew/spew.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class spew(test.test): diff --git a/client/tests/stress/stress.py b/client/tests/stress/stress.py index d49788a8ab..f48d597981 100644 --- a/client/tests/stress/stress.py +++ b/client/tests/stress/stress.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class stress(test.test): diff --git a/client/tests/synctest/synctest.py b/client/tests/synctest/synctest.py index 0494837ffc..8ae1cab692 100644 --- a/client/tests/synctest/synctest.py +++ b/client/tests/synctest/synctest.py @@ -1,6 +1,6 @@ import os -from autotest_lib.client import test -from autotest_lib.client.common_lib import utils +from autotest.client import test +from autotest.client.common_lib import utils class synctest(test.test): diff --git a/client/tests/sysbench/sysbench.py b/client/tests/sysbench/sysbench.py index 974c82c3a7..cba954bf52 100644 --- a/client/tests/sysbench/sysbench.py +++ b/client/tests/sysbench/sysbench.py @@ -1,6 +1,6 @@ import os, time, re, pwd -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class sysbench(test.test): diff --git a/client/tests/systemtap/systemtap.py b/client/tests/systemtap/systemtap.py index 3cdd9cb1bb..42b21448d9 100644 --- a/client/tests/systemtap/systemtap.py +++ b/client/tests/systemtap/systemtap.py @@ -1,6 +1,6 @@ import os, shutil, re -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class systemtap(test.test): diff --git a/client/tests/tbench/tbench.py b/client/tests/tbench/tbench.py index b965cf2e8a..2f2b532aeb 100644 --- a/client/tests/tbench/tbench.py +++ b/client/tests/tbench/tbench.py @@ -1,5 +1,5 @@ import time, os, signal, re -from autotest_lib.client import test, utils +from autotest.client import test, utils class tbench(test.test): diff --git a/client/tests/tiobench/tiobench.py b/client/tests/tiobench/tiobench.py index 16f040131e..54e5d36881 100644 --- a/client/tests/tiobench/tiobench.py +++ b/client/tests/tiobench/tiobench.py @@ -1,5 +1,5 @@ import os, logging -from autotest_lib.client import test, utils +from autotest.client import test, utils class tiobench(test.test): diff --git a/client/tests/tracing_microbenchmark/base_tracer.py b/client/tests/tracing_microbenchmark/base_tracer.py index bbd41f0928..ca12e3bc1a 100644 --- a/client/tests/tracing_microbenchmark/base_tracer.py +++ b/client/tests/tracing_microbenchmark/base_tracer.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import utils +from autotest.client import utils class Tracer(object): diff --git a/client/tests/tracing_microbenchmark/tracers.py b/client/tests/tracing_microbenchmark/tracers.py index c490d68beb..8114a5f39a 100644 --- a/client/tests/tracing_microbenchmark/tracers.py +++ b/client/tests/tracing_microbenchmark/tracers.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client import utils +from autotest.client import utils import base_tracer try: diff --git a/client/tests/tracing_microbenchmark/tracing_microbenchmark.py b/client/tests/tracing_microbenchmark/tracing_microbenchmark.py index f25e7c6e74..41489eacb6 100644 --- a/client/tests/tracing_microbenchmark/tracing_microbenchmark.py +++ b/client/tests/tracing_microbenchmark/tracing_microbenchmark.py @@ -1,7 +1,7 @@ import os import re -from autotest_lib.client import test -from autotest_lib.client import utils +from autotest.client import test +from autotest.client import utils import tracers import base_tracer diff --git a/client/tests/tsc/tsc.py b/client/tests/tsc/tsc.py index ffd21ef591..9bdfb7b67a 100644 --- a/client/tests/tsc/tsc.py +++ b/client/tests/tsc/tsc.py @@ -1,6 +1,6 @@ import os, re, logging -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class tsc(test.test): version = 3 diff --git a/client/tests/unixbench/unixbench.py b/client/tests/unixbench/unixbench.py index 6d8544c316..5c2ad65246 100644 --- a/client/tests/unixbench/unixbench.py +++ b/client/tests/unixbench/unixbench.py @@ -1,6 +1,6 @@ import os, re -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class unixbench(test.test): diff --git a/client/tests/unixbench5/unixbench5.py b/client/tests/unixbench5/unixbench5.py index 940f48d488..42dd850489 100644 --- a/client/tests/unixbench5/unixbench5.py +++ b/client/tests/unixbench5/unixbench5.py @@ -1,6 +1,6 @@ import os, re -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class unixbench5(test.test): diff --git a/client/tests/wb_kupdate/common.py b/client/tests/wb_kupdate/common.py index 9356d20a9a..c18a7eb4cc 100644 --- a/client/tests/wb_kupdate/common.py +++ b/client/tests/wb_kupdate/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/client/tests/wb_kupdate/wb_kupdate.py b/client/tests/wb_kupdate/wb_kupdate.py index ef7b77ae1a..a0bffd1c5c 100644 --- a/client/tests/wb_kupdate/wb_kupdate.py +++ b/client/tests/wb_kupdate/wb_kupdate.py @@ -1,6 +1,6 @@ import datetime, logging, os, time -from autotest_lib.client import test, utils -from autotest_lib.client.common_lib import error +from autotest.client import test, utils +from autotest.client.common_lib import error class wb_kupdate(test.test): version = 1 diff --git a/client/tests/wb_kupdate/wb_kupdate_unittest.py b/client/tests/wb_kupdate/wb_kupdate_unittest.py index 7eda213113..268f513e06 100755 --- a/client/tests/wb_kupdate/wb_kupdate_unittest.py +++ b/client/tests/wb_kupdate/wb_kupdate_unittest.py @@ -6,11 +6,11 @@ import os import time import unittest -from autotest_lib.client import test -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.tests.wb_kupdate import wb_kupdate +from autotest.client import test +from autotest.client import utils +from autotest.client.common_lib import error +from autotest.client.common_lib.test_utils import mock +from autotest.client.tests.wb_kupdate import wb_kupdate class WbKupdateUnitTest(unittest.TestCase): def setUp(self): diff --git a/client/tests/xfstests/control b/client/tests/xfstests/control index 9c9ae63cd1..ea09edc47d 100644 --- a/client/tests/xfstests/control +++ b/client/tests/xfstests/control @@ -63,7 +63,7 @@ Make sure you have them or a real spare device to test things. # Here, by default we use the concept of virtual partition (a partition of 1GB # of size), to avoid setup by the user. However, you'll most likely use a real # block device for your tests. -from autotest_lib.client import partition +from autotest.client import partition file_img = os.path.join(job.tmpdir, 'xfstests.img') vp = partition.virtual_partition(file_img=file_img, file_size=1024*1024) device = vp.device diff --git a/client/tests/xfstests/xfstests.py b/client/tests/xfstests/xfstests.py index c81d9df815..2a444c6ad9 100644 --- a/client/tests/xfstests/xfstests.py +++ b/client/tests/xfstests/xfstests.py @@ -1,6 +1,6 @@ import os, re, glob, logging -from autotest_lib.client.common_lib import error -from autotest_lib.client import test, utils, os_dep +from autotest.client.common_lib import error +from autotest.client import test, utils, os_dep class xfstests(test.test): diff --git a/client/tests/xmtest/xmtest.py b/client/tests/xmtest/xmtest.py index d0362bf452..3e84d1ab2c 100644 --- a/client/tests/xmtest/xmtest.py +++ b/client/tests/xmtest/xmtest.py @@ -4,7 +4,7 @@ # Autotest script for running Xen xm-test # This should be run from a Xen domain0 import os -from autotest_lib.client import test, utils +from autotest.client import test, utils class xmtest(test.test): diff --git a/client/tools/cd_hash.py b/client/tools/cd_hash.py index cb25cdc1cd..2b298329ef 100755 --- a/client/tools/cd_hash.py +++ b/client/tools/cd_hash.py @@ -10,9 +10,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import logging_manager -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import logging_manager +from autotest.client import utils +from autotest.client.virt import virt_utils if __name__ == "__main__": diff --git a/client/tools/common.py b/client/tools/common.py index 6881386b02..fd98cb9eb9 100644 --- a/client/tools/common.py +++ b/client/tools/common.py @@ -5,4 +5,4 @@ import setup_modules sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/tools/tapfd_helper.py b/client/tools/tapfd_helper.py index 4ba92bf395..66fdbd0f59 100755 --- a/client/tools/tapfd_helper.py +++ b/client/tools/tapfd_helper.py @@ -2,8 +2,8 @@ import sys, os, re, logging import common -from autotest_lib.client.common_lib import logging_manager -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import logging_manager +from autotest.client.virt import virt_utils def destroy_tap(tapfd_list): diff --git a/client/utils.py b/client/utils.py index b4b8c09c8f..8fc2820d5c 100644 --- a/client/utils.py +++ b/client/utils.py @@ -9,7 +9,7 @@ """ import os -from autotest_lib.client.common_lib.utils import * -from autotest_lib.client.base_utils import * +from autotest.client.common_lib.utils import * +from autotest.client.base_utils import * if os.path.exists(os.path.join(os.path.dirname(__file__), 'site_utils.py')): - from autotest_lib.client.site_utils import * + from autotest.client.site_utils import * diff --git a/client/virt/base_installer.py b/client/virt/base_installer.py index 3b4b0ec892..ef08c2f00f 100644 --- a/client/virt/base_installer.py +++ b/client/virt/base_installer.py @@ -7,9 +7,9 @@ ''' import os, logging -from autotest_lib.client import utils, os_dep -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client import utils, os_dep +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils class VirtInstallException(Exception): ''' diff --git a/client/virt/common.py b/client/virt/common.py index 7fc8f6a578..40de5fa6dd 100644 --- a/client/virt/common.py +++ b/client/virt/common.py @@ -5,5 +5,5 @@ import setup_modules sys.path.pop(0) setup_modules.setup(base_path=client_dir, - root_module_name="autotest_lib.client") + root_module_name="autotest.client") diff --git a/client/virt/installer.py b/client/virt/installer.py index 4e9685328c..412a18ae9a 100644 --- a/client/virt/installer.py +++ b/client/virt/installer.py @@ -6,8 +6,8 @@ The most common use case is to simply call make_installer() inside your tests. ''' -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import base_installer, kvm_installer +from autotest.client.common_lib import error +from autotest.client.virt import base_installer, kvm_installer __all__ = ['InstallerRegistry', 'INSTALLER_REGISTRY', 'make_installer', 'run_installers'] diff --git a/client/virt/installer_unittest.py b/client/virt/installer_unittest.py index 475b448cff..5b306faec5 100755 --- a/client/virt/installer_unittest.py +++ b/client/virt/installer_unittest.py @@ -2,8 +2,8 @@ import unittest import common -from autotest_lib.client.virt import installer -from autotest_lib.client.common_lib import cartesian_config +from autotest.client.virt import installer +from autotest.client.common_lib import cartesian_config class installer_test(unittest.TestCase): diff --git a/client/virt/kvm_installer.py b/client/virt/kvm_installer.py index 07c142322d..082a9c4a6c 100644 --- a/client/virt/kvm_installer.py +++ b/client/virt/kvm_installer.py @@ -5,9 +5,9 @@ """ import os, logging -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import base_installer +from autotest.client import utils +from autotest.client.common_lib import error +from autotest.client.virt import base_installer __all__ = ['GitRepoInstaller', 'LocalSourceDirInstaller', diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py index 3938ede37a..ab7f201465 100644 --- a/client/virt/kvm_vm.py +++ b/client/virt/kvm_vm.py @@ -5,8 +5,8 @@ """ import time, os, logging, fcntl, re, commands, glob -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils import virt_utils, virt_vm, virt_test_setup, kvm_monitor, aexpect diff --git a/client/virt/libvirt_monitor.py b/client/virt/libvirt_monitor.py index 3c4609455b..854f2f4a32 100644 --- a/client/virt/libvirt_monitor.py +++ b/client/virt/libvirt_monitor.py @@ -1,6 +1,6 @@ import re, tempfile, xml.dom.minidom, logging import virt_utils, aexpect -from autotest_lib.client import utils +from autotest.client import utils class VirshMonitor: diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py index b627eba3c2..57c3e5c440 100644 --- a/client/virt/libvirt_vm.py +++ b/client/virt/libvirt_vm.py @@ -5,8 +5,8 @@ """ import time, os, logging, fcntl, re, commands, shutil, urlparse -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils, os_dep +from autotest.client.common_lib import error +from autotest.client import utils, os_dep from xml.dom import minidom import virt_utils, virt_vm, aexpect diff --git a/client/virt/ppm_utils.py b/client/virt/ppm_utils.py index ef6a681427..cd952e4b25 100644 --- a/client/virt/ppm_utils.py +++ b/client/virt/ppm_utils.py @@ -5,7 +5,7 @@ """ import os, struct, time, re -from autotest_lib.client import utils +from autotest.client import utils # Some directory/filename utils, for consistency diff --git a/client/virt/qemu_io.py b/client/virt/qemu_io.py index b27a080a72..dd59a8453c 100644 --- a/client/virt/qemu_io.py +++ b/client/virt/qemu_io.py @@ -1,6 +1,6 @@ import re, logging -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils import aexpect import virt_utils diff --git a/client/virt/tests/autotest.py b/client/virt/tests/autotest.py index 5157d00b87..a23e0d70b7 100644 --- a/client/virt/tests/autotest.py +++ b/client/virt/tests/autotest.py @@ -1,5 +1,5 @@ import os -from autotest_lib.client.virt import virt_test_utils +from autotest.client.virt import virt_test_utils def run_autotest(test, params, env): diff --git a/client/virt/tests/boot.py b/client/virt/tests/boot.py index adc66109af..07073d72d1 100644 --- a/client/virt/tests/boot.py +++ b/client/virt/tests/boot.py @@ -2,7 +2,7 @@ import sys import re -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def _get_function(func_name): diff --git a/client/virt/tests/boot_savevm.py b/client/virt/tests/boot_savevm.py index a7720026fb..50cb52a69f 100644 --- a/client/virt/tests/boot_savevm.py +++ b/client/virt/tests/boot_savevm.py @@ -1,6 +1,6 @@ import logging, time, tempfile, os.path -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils def run_boot_savevm(test, params, env): """ diff --git a/client/virt/tests/build.py b/client/virt/tests/build.py index c5dbc2bbb5..3ee9e533a5 100644 --- a/client/virt/tests/build.py +++ b/client/virt/tests/build.py @@ -1,6 +1,6 @@ -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import installer -from autotest_lib.client.virt import base_installer +from autotest.client.common_lib import error +from autotest.client.virt import installer +from autotest.client.virt import base_installer def run_build(test, params, env): diff --git a/client/virt/tests/clock_getres.py b/client/virt/tests/clock_getres.py index a3db361038..79c9664d9e 100644 --- a/client/virt/tests/clock_getres.py +++ b/client/virt/tests/clock_getres.py @@ -1,6 +1,6 @@ import logging, os -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils def run_clock_getres(test, params, env): diff --git a/client/virt/tests/dd_test.py b/client/virt/tests/dd_test.py index 48d32b5dd5..81596a2d33 100644 --- a/client/virt/tests/dd_test.py +++ b/client/virt/tests/dd_test.py @@ -4,9 +4,9 @@ @copyright: 2012 Red Hat, Inc. """ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt.aexpect import ShellCmdError -from autotest_lib.client.virt.aexpect import ShellTimeoutError +from autotest.client.common_lib import error +from autotest.client.virt.aexpect import ShellCmdError +from autotest.client.virt.aexpect import ShellTimeoutError def run_dd_test(test, params, env): diff --git a/client/virt/tests/ethtool.py b/client/virt/tests/ethtool.py index 58ee44ef6b..3f63cbb773 100644 --- a/client/virt/tests/ethtool.py +++ b/client/virt/tests/ethtool.py @@ -1,7 +1,7 @@ import logging, re -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_test_utils, virt_utils, aexpect +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_test_utils, virt_utils, aexpect def run_ethtool(test, params, env): diff --git a/client/virt/tests/file_transfer.py b/client/virt/tests/file_transfer.py index f0cfe5bd1f..6d11c09273 100644 --- a/client/virt/tests/file_transfer.py +++ b/client/virt/tests/file_transfer.py @@ -1,7 +1,7 @@ import logging, time, os -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_utils def run_file_transfer(test, params, env): diff --git a/client/virt/tests/fillup_disk.py b/client/virt/tests/fillup_disk.py index 97cd7b8f03..e6b79cf9b3 100644 --- a/client/virt/tests/fillup_disk.py +++ b/client/virt/tests/fillup_disk.py @@ -1,5 +1,5 @@ import logging -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def run_fillup_disk(test, params, env): """ diff --git a/client/virt/tests/guest_s4.py b/client/virt/tests/guest_s4.py index 5b5708d33c..6041dfbe5b 100644 --- a/client/virt/tests/guest_s4.py +++ b/client/virt/tests/guest_s4.py @@ -1,6 +1,6 @@ import logging, time -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils @error.context_aware diff --git a/client/virt/tests/guest_test.py b/client/virt/tests/guest_test.py index 2d067095aa..09ced2dfee 100644 --- a/client/virt/tests/guest_test.py +++ b/client/virt/tests/guest_test.py @@ -1,5 +1,5 @@ import os, logging -from autotest_lib.client.virt import virt_utils +from autotest.client.virt import virt_utils def run_guest_test(test, params, env): diff --git a/client/virt/tests/image_copy.py b/client/virt/tests/image_copy.py index 96bfd66b8f..eecd19634a 100644 --- a/client/virt/tests/image_copy.py +++ b/client/virt/tests/image_copy.py @@ -1,7 +1,7 @@ import os, logging -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_utils def run_image_copy(test, params, env): diff --git a/client/virt/tests/iofuzz.py b/client/virt/tests/iofuzz.py index 0c0e6e8539..959d427220 100644 --- a/client/virt/tests/iofuzz.py +++ b/client/virt/tests/iofuzz.py @@ -1,6 +1,6 @@ import logging, re, random -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import aexpect +from autotest.client.common_lib import error +from autotest.client.virt import aexpect def run_iofuzz(test, params, env): diff --git a/client/virt/tests/iozone_windows.py b/client/virt/tests/iozone_windows.py index 4a90a8f457..a5dc905bd1 100644 --- a/client/virt/tests/iozone_windows.py +++ b/client/virt/tests/iozone_windows.py @@ -1,6 +1,6 @@ import logging, os -from autotest_lib.client import utils -from autotest_lib.client.tests.iozone import postprocessing +from autotest.client import utils +from autotest.client.tests.iozone import postprocessing def run_iozone_windows(test, params, env): diff --git a/client/virt/tests/jumbo.py b/client/virt/tests/jumbo.py index 47cc57afc0..98d3c75d12 100644 --- a/client/virt/tests/jumbo.py +++ b/client/virt/tests/jumbo.py @@ -1,7 +1,7 @@ import logging, commands, random -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils, virt_test_utils +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_utils, virt_test_utils def run_jumbo(test, params, env): diff --git a/client/virt/tests/kdump.py b/client/virt/tests/kdump.py index 9e6215482a..a9e318a1ac 100644 --- a/client/virt/tests/kdump.py +++ b/client/virt/tests/kdump.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils def run_kdump(test, params, env): diff --git a/client/virt/tests/linux_s3.py b/client/virt/tests/linux_s3.py index 5a04fca0c8..a63bb84516 100644 --- a/client/virt/tests/linux_s3.py +++ b/client/virt/tests/linux_s3.py @@ -1,5 +1,5 @@ import logging, time -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def run_linux_s3(test, params, env): diff --git a/client/virt/tests/lvm.py b/client/virt/tests/lvm.py index d171747556..cf0bdc71d4 100644 --- a/client/virt/tests/lvm.py +++ b/client/virt/tests/lvm.py @@ -1,5 +1,5 @@ import logging, os -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error @error.context_aware diff --git a/client/virt/tests/mac_change.py b/client/virt/tests/mac_change.py index d2eaf01b46..368b960de3 100644 --- a/client/virt/tests/mac_change.py +++ b/client/virt/tests/mac_change.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, virt_test_utils def run_mac_change(test, params, env): diff --git a/client/virt/tests/module_probe.py b/client/virt/tests/module_probe.py index 6bb1a7beb0..bfea1ce1f1 100644 --- a/client/virt/tests/module_probe.py +++ b/client/virt/tests/module_probe.py @@ -1,6 +1,6 @@ import re, commands, logging, os -from autotest_lib.client.common_lib import error, utils -from autotest_lib.client.virt import base_installer +from autotest.client.common_lib import error, utils +from autotest.client.virt import base_installer def run_module_probe(test, params, env): diff --git a/client/virt/tests/multicast.py b/client/virt/tests/multicast.py index 919794116b..b91f465c14 100644 --- a/client/virt/tests/multicast.py +++ b/client/virt/tests/multicast.py @@ -1,7 +1,7 @@ import logging, os, re -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_test_utils, aexpect +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_test_utils, aexpect def run_multicast(test, params, env): diff --git a/client/virt/tests/netperf.py b/client/virt/tests/netperf.py index 300ec69345..0aa2b3e2d6 100644 --- a/client/virt/tests/netperf.py +++ b/client/virt/tests/netperf.py @@ -1,9 +1,9 @@ import logging, os, commands, sys, threading, re, glob -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import aexpect, virt_utils -from autotest_lib.client.virt import virt_test_utils -from autotest_lib.server.hosts.ssh_host import SSHHost +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import aexpect, virt_utils +from autotest.client.virt import virt_test_utils +from autotest.server.hosts.ssh_host import SSHHost def run_netperf(test, params, env): """ diff --git a/client/virt/tests/netstress_kill_guest.py b/client/virt/tests/netstress_kill_guest.py index ff3f7b1b9d..1db4ee13cf 100644 --- a/client/virt/tests/netstress_kill_guest.py +++ b/client/virt/tests/netstress_kill_guest.py @@ -1,7 +1,7 @@ import logging, os, signal, re, time -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import aexpect, virt_utils +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import aexpect, virt_utils def run_netstress_kill_guest(test, params, env): diff --git a/client/virt/tests/nfs_corrupt.py b/client/virt/tests/nfs_corrupt.py index 805c7348ad..34ccd68111 100644 --- a/client/virt/tests/nfs_corrupt.py +++ b/client/virt/tests/nfs_corrupt.py @@ -1,8 +1,8 @@ import logging, os, re -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils, os_dep -from autotest_lib.client.virt import virt_utils -from autotest_lib.client.virt import virt_env_process +from autotest.client.common_lib import error +from autotest.client import utils, os_dep +from autotest.client.virt import virt_utils +from autotest.client.virt import virt_env_process class NFSCorruptConfig(object): diff --git a/client/virt/tests/nic_promisc.py b/client/virt/tests/nic_promisc.py index f401a9220e..31b4b2ba88 100644 --- a/client/virt/tests/nic_promisc.py +++ b/client/virt/tests/nic_promisc.py @@ -1,8 +1,8 @@ import logging, threading -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt.tests import file_transfer -from autotest_lib.client.virt import virt_test_utils, virt_utils +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt.tests import file_transfer +from autotest.client.virt import virt_test_utils, virt_utils def run_nic_promisc(test, params, env): diff --git a/client/virt/tests/nicdriver_unload.py b/client/virt/tests/nicdriver_unload.py index 375235cda9..6aab465c35 100644 --- a/client/virt/tests/nicdriver_unload.py +++ b/client/virt/tests/nicdriver_unload.py @@ -1,8 +1,8 @@ import logging, threading, os, time -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt.tests import file_transfer -from autotest_lib.client.virt import virt_test_utils, virt_utils +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt.tests import file_transfer +from autotest.client.virt import virt_test_utils, virt_utils def run_nicdriver_unload(test, params, env): diff --git a/client/virt/tests/ntttcp.py b/client/virt/tests/ntttcp.py index 83fb3b92f9..e71d8f6a6f 100644 --- a/client/virt/tests/ntttcp.py +++ b/client/virt/tests/ntttcp.py @@ -1,7 +1,7 @@ import logging, os, glob, re, commands -from autotest_lib.client.common_lib import error -from autotest_lib.client.common_lib import utils -from autotest_lib.client.virt import virt_utils, aexpect, virt_test_utils +from autotest.client.common_lib import error +from autotest.client.common_lib import utils +from autotest.client.virt import virt_utils, aexpect, virt_test_utils _receiver_ready = False diff --git a/client/virt/tests/ping.py b/client/virt/tests/ping.py index 08791fb306..42894e0dae 100644 --- a/client/virt/tests/ping.py +++ b/client/virt/tests/ping.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_test_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_test_utils def run_ping(test, params, env): diff --git a/client/virt/tests/pxe.py b/client/virt/tests/pxe.py index 325e353b49..b7f6ea2a00 100644 --- a/client/virt/tests/pxe.py +++ b/client/virt/tests/pxe.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import aexpect +from autotest.client.common_lib import error +from autotest.client.virt import aexpect def run_pxe(test, params, env): """ diff --git a/client/virt/tests/remove_guest.py b/client/virt/tests/remove_guest.py index 102a55e904..2c1b896c57 100644 --- a/client/virt/tests/remove_guest.py +++ b/client/virt/tests/remove_guest.py @@ -1,6 +1,6 @@ import logging, time -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils @error.context_aware diff --git a/client/virt/tests/save_restore.py b/client/virt/tests/save_restore.py index 64ccf4c156..255a9867a8 100644 --- a/client/virt/tests/save_restore.py +++ b/client/virt/tests/save_restore.py @@ -1,5 +1,5 @@ import logging, time, tempfile, os.path -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def run_save_restore(test, params, env): """ diff --git a/client/virt/tests/shutdown.py b/client/virt/tests/shutdown.py index 4fbb9b8390..4f700951ec 100644 --- a/client/virt/tests/shutdown.py +++ b/client/virt/tests/shutdown.py @@ -1,6 +1,6 @@ import logging, time -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils @error.context_aware diff --git a/client/virt/tests/softlockup.py b/client/virt/tests/softlockup.py index 3b4dc4fb85..a7a2c5c481 100644 --- a/client/virt/tests/softlockup.py +++ b/client/virt/tests/softlockup.py @@ -1,6 +1,6 @@ import logging, os, socket, time -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error +from autotest.client import utils +from autotest.client.common_lib import error def run_softlockup(test, params, env): """ diff --git a/client/virt/tests/stress_boot.py b/client/virt/tests/stress_boot.py index e3ac14d276..19c08f7cc8 100644 --- a/client/virt/tests/stress_boot.py +++ b/client/virt/tests/stress_boot.py @@ -1,6 +1,6 @@ import logging -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_env_process +from autotest.client.common_lib import error +from autotest.client.virt import virt_env_process @error.context_aware diff --git a/client/virt/tests/trans_hugepage.py b/client/virt/tests/trans_hugepage.py index 335fc20180..f1c978c076 100644 --- a/client/virt/tests/trans_hugepage.py +++ b/client/virt/tests/trans_hugepage.py @@ -1,7 +1,7 @@ import logging, os, re -from autotest_lib.client.common_lib import error -from autotest_lib.client.common_lib import utils -from autotest_lib.client.virt import virt_test_utils, aexpect, virt_test_setup +from autotest.client.common_lib import error +from autotest.client.common_lib import utils +from autotest.client.virt import virt_test_utils, aexpect, virt_test_setup @error.context_aware diff --git a/client/virt/tests/trans_hugepage_defrag.py b/client/virt/tests/trans_hugepage_defrag.py index b60c1636cc..b68b29aeee 100644 --- a/client/virt/tests/trans_hugepage_defrag.py +++ b/client/virt/tests/trans_hugepage_defrag.py @@ -1,7 +1,7 @@ import logging, time, os, re -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_test_utils, virt_test_setup +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_test_utils, virt_test_setup @error.context_aware diff --git a/client/virt/tests/trans_hugepage_swapping.py b/client/virt/tests/trans_hugepage_swapping.py index 5610669cdd..09ec37e4d4 100644 --- a/client/virt/tests/trans_hugepage_swapping.py +++ b/client/virt/tests/trans_hugepage_swapping.py @@ -1,8 +1,8 @@ import logging, os, re -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_utils, virt_test_utils -from autotest_lib.client.virt import virt_test_setup, virt_env_process +from autotest.client.common_lib import error +from autotest.client import utils +from autotest.client.virt import virt_utils, virt_test_utils +from autotest.client.virt import virt_test_setup, virt_env_process @error.context_aware diff --git a/client/virt/tests/unattended_install.py b/client/virt/tests/unattended_install.py index aad5132101..a49572e97c 100644 --- a/client/virt/tests/unattended_install.py +++ b/client/virt/tests/unattended_install.py @@ -1,10 +1,10 @@ import logging, time, socket, re, os, shutil, tempfile, glob, ConfigParser import threading import xml.dom.minidom -from autotest_lib.client.common_lib import error, iso9660 -from autotest_lib.client import utils -from autotest_lib.client.virt import virt_vm, virt_utils, virt_http_server -from autotest_lib.client.virt import libvirt_vm, kvm_monitor +from autotest.client.common_lib import error, iso9660 +from autotest.client import utils +from autotest.client.virt import virt_vm, virt_utils, virt_http_server +from autotest.client.virt import libvirt_vm, kvm_monitor # Whether to print all shell commands called diff --git a/client/virt/tests/vlan.py b/client/virt/tests/vlan.py index 9fc1f6401e..009c7cdef8 100644 --- a/client/virt/tests/vlan.py +++ b/client/virt/tests/vlan.py @@ -1,6 +1,6 @@ import logging, time, re -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, virt_test_utils, aexpect +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, virt_test_utils, aexpect def run_vlan(test, params, env): diff --git a/client/virt/tests/watchdog.py b/client/virt/tests/watchdog.py index 603685f311..8aee4e3f87 100644 --- a/client/virt/tests/watchdog.py +++ b/client/virt/tests/watchdog.py @@ -1,6 +1,6 @@ import logging, time, shutil -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils def run_watchdog(test, params, env): diff --git a/client/virt/tests/whql_client_install.py b/client/virt/tests/whql_client_install.py index 84efcbd50f..a4222c6ee5 100644 --- a/client/virt/tests/whql_client_install.py +++ b/client/virt/tests/whql_client_install.py @@ -1,6 +1,6 @@ import logging, time, os -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, virt_test_utils, rss_client +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, virt_test_utils, rss_client def run_whql_client_install(test, params, env): diff --git a/client/virt/tests/whql_submission.py b/client/virt/tests/whql_submission.py index 0bdf13db3c..f5067dc128 100644 --- a/client/virt/tests/whql_submission.py +++ b/client/virt/tests/whql_submission.py @@ -1,6 +1,6 @@ import logging, os, re -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, rss_client, aexpect +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, rss_client, aexpect def run_whql_submission(test, params, env): diff --git a/client/virt/virt_env_process.py b/client/virt/virt_env_process.py index 3ea7b57211..f7ffed6899 100644 --- a/client/virt/virt_env_process.py +++ b/client/virt/virt_env_process.py @@ -1,6 +1,6 @@ import os, time, commands, re, logging, glob, threading, shutil -from autotest_lib.client import utils -from autotest_lib.client.common_lib import error +from autotest.client import utils +from autotest.client.common_lib import error import aexpect, virt_utils, kvm_monitor, ppm_utils, virt_test_setup import virt_vm, kvm_vm, libvirt_vm, virt_video_maker try: diff --git a/client/virt/virt_test.py b/client/virt/virt_test.py index e140b4f478..8430d72adf 100644 --- a/client/virt/virt_test.py +++ b/client/virt/virt_test.py @@ -1,8 +1,8 @@ import os, sys, logging, imp -from autotest_lib.client import test -from autotest_lib.client.common_lib import error -from autotest_lib.client.virt import virt_utils, virt_env_process +from autotest.client import test +from autotest.client.common_lib import error +from autotest.client.virt import virt_utils, virt_env_process class virt_test(test.test): diff --git a/client/virt/virt_test_setup.py b/client/virt/virt_test_setup.py index 7447af33ca..6dad9b877d 100644 --- a/client/virt/virt_test_setup.py +++ b/client/virt/virt_test_setup.py @@ -2,8 +2,8 @@ Library to perform pre/post test setup for KVM autotest. """ import os, logging, time, re, random -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils class THPError(Exception): diff --git a/client/virt/virt_test_utils.py b/client/virt/virt_test_utils.py index 5dbb04d201..034492117e 100644 --- a/client/virt/virt_test_utils.py +++ b/client/virt/virt_test_utils.py @@ -22,9 +22,9 @@ """ import time, os, logging, re, signal, imp, tempfile -from autotest_lib.client.common_lib import error, global_config -from autotest_lib.client import utils -from autotest_lib.client.tools import scan_results +from autotest.client.common_lib import error, global_config +from autotest.client import utils +from autotest.client.tools import scan_results import aexpect, virt_utils, virt_vm GLOBAL_CONFIG = global_config.global_config diff --git a/client/virt/virt_utils.py b/client/virt/virt_utils.py index ce8f9c8c9f..8035551d2e 100644 --- a/client/virt/virt_utils.py +++ b/client/virt/virt_utils.py @@ -7,11 +7,11 @@ import time, string, random, socket, os, signal, re, logging, commands, cPickle import fcntl, shelve, ConfigParser, threading, sys, UserDict, inspect, tarfile import struct, shutil, glob -from autotest_lib.client import utils, os_dep -from autotest_lib.client.common_lib import error, logging_config -from autotest_lib.client.common_lib import logging_manager, git -from autotest_lib.client.virt import virt_env_process, virt_vm -from autotest_lib.client.common_lib.syncdata import SyncData, SyncListenServer +from autotest.client import utils, os_dep +from autotest.client.common_lib import error, logging_config +from autotest.client.common_lib import logging_manager, git +from autotest.client.virt import virt_env_process, virt_vm +from autotest.client.common_lib.syncdata import SyncData, SyncListenServer import rss_client, aexpect import platform diff --git a/client/virt/virt_utils_unittest.py b/client/virt/virt_utils_unittest.py index 090dc10df6..21d2cc989a 100755 --- a/client/virt/virt_utils_unittest.py +++ b/client/virt/virt_utils_unittest.py @@ -2,10 +2,10 @@ import unittest, logging import common -from autotest_lib.client.virt import virt_utils -from autotest_lib.client import utils -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib import cartesian_config +from autotest.client.virt import virt_utils +from autotest.client import utils +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib import cartesian_config class virt_utils_test(unittest.TestCase): diff --git a/client/virt/virt_vm.py b/client/virt/virt_vm.py index 374eee950e..0d1c382d56 100644 --- a/client/virt/virt_vm.py +++ b/client/virt/virt_vm.py @@ -1,6 +1,6 @@ import os, logging, time, glob, re, shutil -from autotest_lib.client.common_lib import error -from autotest_lib.client import utils +from autotest.client.common_lib import error +from autotest.client import utils import virt_utils class VMError(Exception): diff --git a/client/xen.py b/client/xen.py index 1950268382..aca7ffb6fe 100644 --- a/client/xen.py +++ b/client/xen.py @@ -2,8 +2,8 @@ Copyright IBM Corp. 2006, Ryan Harper """ import os, shutil, copy, pickle, re, glob -from autotest_lib.client import kernel, kernel_config, os_dep, test -from autotest_lib.client import utils +from autotest.client import kernel, kernel_config, os_dep, test +from autotest.client import utils class xen(kernel.kernel): diff --git a/common.py b/common.py index 9d239a929d..7b42a76867 100644 --- a/common.py +++ b/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/conmux/contrib/console_check.py b/conmux/contrib/console_check.py index 86a8d87b3c..d170d471f3 100755 --- a/conmux/contrib/console_check.py +++ b/conmux/contrib/console_check.py @@ -16,7 +16,7 @@ import sys, pexpect, commands, os from optparse import OptionParser -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config GLOBAL_CONFIG = global_config.global_config diff --git a/contrib/virt/control.template b/contrib/virt/control.template index 2e96d21e64..64134e1639 100644 --- a/contrib/virt/control.template +++ b/contrib/virt/control.template @@ -1,6 +1,6 @@ import logging, os, sys, fcntl kvm_test_dir = "/usr/local/autotest/client/tests/kvm" -from autotest_lib.client.common_lib import cartesian_config +from autotest.client.common_lib import cartesian_config def get_control(params, custom_cfg, kernel_install=True): control = ''' @@ -8,8 +8,8 @@ import sys, os, logging os.environ['LANG'] = 'en_US.UTF-8' kvm_test_dir = os.path.join(os.environ['AUTODIR'],'tests', 'kvm') sys.path.append(kvm_test_dir) -from autotest_lib.client.common_lib import cartesian_config -from autotest_lib.client.virt import virt_utils +from autotest.client.common_lib import cartesian_config +from autotest.client.virt import virt_utils kernel_install_params = %s custom_cfg = %s diff --git a/contrib/virt/site_job.py b/contrib/virt/site_job.py index 98c738b4fa..76c522f2f0 100644 --- a/contrib/virt/site_job.py +++ b/contrib/virt/site_job.py @@ -1,10 +1,10 @@ import os, re, sys, pwd, time, socket, getpass import inspect, new, logging, string, tempfile -from autotest_lib.cli import topic_common, action_common -from autotest_lib.cli import job -from autotest_lib.client.common_lib import logging_config -from autotest_lib.client.virt import virt_utils +from autotest.cli import topic_common, action_common +from autotest.cli import job +from autotest.client.common_lib import logging_config +from autotest.client.virt import virt_utils logging_config.LoggingConfig().configure_logging(verbose=True) diff --git a/database/autotest-upgrade-db b/database/autotest-upgrade-db index 1878bb56fe..47b878c059 100755 --- a/database/autotest-upgrade-db +++ b/database/autotest-upgrade-db @@ -4,7 +4,7 @@ try: import autotest.common as common except ImportError: import common -from autotest_lib.database import migrate +from autotest.database import migrate if __name__ == '__main__': diff --git a/database/common.py b/database/common.py index 0a5eb450af..228568bf49 100644 --- a/database/common.py +++ b/database/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/database/database_connection.py b/database/database_connection.py index 7946b3c9fd..55a5fb9d0d 100644 --- a/database/database_connection.py +++ b/database/database_connection.py @@ -3,7 +3,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config RECONNECT_FOREVER = object() diff --git a/database/database_connection_unittest.py b/database/database_connection_unittest.py index 9b4f2cbe7a..8b58c7aaa3 100755 --- a/database/database_connection_unittest.py +++ b/database/database_connection_unittest.py @@ -5,9 +5,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.database import database_connection +from autotest.client.common_lib import global_config +from autotest.client.common_lib.test_utils import mock +from autotest.database import database_connection _CONFIG_SECTION = 'AUTOTEST_WEB' _HOST = 'myhost' diff --git a/database/db_utils_unittest.py b/database/db_utils_unittest.py index f0e95c30b0..20fd5a18fb 100755 --- a/database/db_utils_unittest.py +++ b/database/db_utils_unittest.py @@ -5,8 +5,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.database import migrate, db_utils +from autotest.client.common_lib.test_utils import mock +from autotest.database import migrate, db_utils class UtilsTest(unittest.TestCase): diff --git a/database/migrate.py b/database/migrate.py index 0315652de7..d7823cdd36 100755 --- a/database/migrate.py +++ b/database/migrate.py @@ -7,8 +7,8 @@ except ImportError: import common import MySQLdb, MySQLdb.constants.ER -from autotest_lib.client.common_lib import global_config, utils -from autotest_lib.database import database_connection +from autotest.client.common_lib import global_config, utils +from autotest.database import database_connection MIGRATE_TABLE = 'migrate_info' diff --git a/database/migrate_unittest.py b/database/migrate_unittest.py index c39146559b..84ef3643e9 100755 --- a/database/migrate_unittest.py +++ b/database/migrate_unittest.py @@ -6,8 +6,8 @@ except ImportError: import common import MySQLdb -from autotest_lib.client.common_lib import global_config -from autotest_lib.database import database_connection, migrate +from autotest.client.common_lib import global_config +from autotest.database import database_connection, migrate # Which section of the global config to pull info from. We won't actually use # that DB, we'll use the corresponding test DB (test_). diff --git a/database/setup.py b/database/setup.py index ee5c4da27f..e1e264ddb3 100644 --- a/database/setup.py +++ b/database/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up db_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/frontend/afe/admin.py b/frontend/afe/admin.py index 4c73837281..4a23a15acd 100644 --- a/frontend/afe/admin.py +++ b/frontend/afe/admin.py @@ -4,8 +4,8 @@ from django.contrib import admin from django.db import models as dbmodels -from autotest_lib.frontend import settings -from autotest_lib.frontend.afe import model_logic, models +from autotest.frontend import settings +from autotest.frontend.afe import model_logic, models class SiteAdmin(admin.ModelAdmin): diff --git a/frontend/afe/common.py b/frontend/afe/common.py index 9356d20a9a..c18a7eb4cc 100644 --- a/frontend/afe/common.py +++ b/frontend/afe/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/frontend/afe/control_file.py b/frontend/afe/control_file.py index d9df3e64a6..dce62e9668 100644 --- a/frontend/afe/control_file.py +++ b/frontend/afe/control_file.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend.afe import model_logic +from autotest.frontend.afe import model_logic import frontend.settings AUTOTEST_DIR = os.path.abspath(os.path.join( @@ -59,7 +59,7 @@ def step_test(kernel_version): %s pass \""" -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error at = autotest_remote.Autotest() @@ -124,7 +124,7 @@ def upload_kernel_config(host, kernel_info): dictionary. \""" import os - from autotest_lib.client.common_lib import autotemp, utils + from autotest.client.common_lib import autotemp, utils config_orig = kernel_info.get('config_file') diff --git a/frontend/afe/doctests/001_rpc_test.txt b/frontend/afe/doctests/001_rpc_test.txt index d62fc21e0e..efc540e562 100644 --- a/frontend/afe/doctests/001_rpc_test.txt +++ b/frontend/afe/doctests/001_rpc_test.txt @@ -8,26 +8,26 @@ # 'http://hostname:8000/afe/server/rpc/') # ) >>> if 'rpc_interface' not in globals(): -... from autotest_lib.frontend.afe import rpc_interface, models -... from autotest_lib.frontend import thread_local +... from autotest.frontend.afe import rpc_interface, models +... from autotest.frontend import thread_local ... # set up a user for us to "login" as ... user = models.User(login='debug_user') ... user.access_level = 100 ... user.save() ... thread_local.set_user(user) ... ->>> from autotest_lib.frontend.afe import model_logic +>>> from autotest.frontend.afe import model_logic # get directory of this test file; we'll need it later >>> import common ->>> from autotest_lib.frontend.afe import test +>>> from autotest.frontend.afe import test >>> import os, datetime >>> test_path = os.path.join(os.path.dirname(test.__file__), ... 'doctests') >>> test_path = os.path.abspath(test_path) # disable logging ->>> from autotest_lib.client.common_lib import logging_manager +>>> from autotest.client.common_lib import logging_manager >>> logging_manager.logger.setLevel(100) >>> drone_set = models.DroneSet.default_drone_set_name() @@ -914,7 +914,7 @@ ValidationError: {'hosts': u'Host(s) "ahost1, ahost2" are atomic group hosts but ... dependencies=['blue-label']) >>> peon_user = models.User(login='peon_user') >>> peon_user.access_level = 0 ->>> from autotest_lib.client.common_lib.test_utils import mock +>>> from autotest.client.common_lib.test_utils import mock >>> god = mock.mock_god() >>> god.stub_function(models.User, "current_user") >>> models.User.current_user.expect_call().and_return(peon_user) diff --git a/frontend/afe/doctests/003_misc_rpc_features.txt b/frontend/afe/doctests/003_misc_rpc_features.txt index 12e307741f..15cf49aa5c 100644 --- a/frontend/afe/doctests/003_misc_rpc_features.txt +++ b/frontend/afe/doctests/003_misc_rpc_features.txt @@ -2,7 +2,7 @@ # that would clutter the main rpc_test # setup ->>> from autotest_lib.frontend.afe import rpc_interface +>>> from autotest.frontend.afe import rpc_interface >>> rpc_interface.add_profiler(name='oprofile') 1 @@ -159,7 +159,7 @@ def step_test(kernel_version): job.automatic_test_tag = host.get_kernel_ver() pass """ -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error at = autotest_remote.Autotest() def install_kernel(machine, kernel_info): host = hosts.create_host(machine) @@ -237,7 +237,7 @@ def step_test(kernel_version): job.automatic_test_tag = host.get_kernel_ver() pass """ -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error at = autotest_remote.Autotest() def upload_kernel_config(host, kernel_info): """ @@ -248,7 +248,7 @@ def upload_kernel_config(host, kernel_info): dictionary. """ import os - from autotest_lib.client.common_lib import autotemp, utils + from autotest.client.common_lib import autotemp, utils config_orig = kernel_info.get('config_file') # if the file is not an URL then we assume it's a local client path if not config_orig or not utils.is_url(config_orig): @@ -306,7 +306,7 @@ step_init() # test that multiline quoted strings are not indented >>> import common ->>> from autotest_lib.frontend.afe import test, control_file +>>> from autotest.frontend.afe import test, control_file >>> import os >>> control_path = os.path.join(os.path.dirname(test.__file__), ... 'doctests', 'test.control.3') diff --git a/frontend/afe/feeds/feed.py b/frontend/afe/feeds/feed.py index 58ffe9783e..76314de263 100644 --- a/frontend/afe/feeds/feed.py +++ b/frontend/afe/feeds/feed.py @@ -1,6 +1,6 @@ import django.http from django.contrib.syndication import feeds -from autotest_lib.frontend.afe import models +from autotest.frontend.afe import models # Copied from django/contrib/syndication/views.py. The default view doesn't diff --git a/frontend/afe/frontend_test_utils.py b/frontend/afe/frontend_test_utils.py index bb7ccb7e58..7970f25afc 100644 --- a/frontend/afe/frontend_test_utils.py +++ b/frontend/afe/frontend_test_utils.py @@ -3,11 +3,11 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_test_environment -from autotest_lib.frontend import thread_local -from autotest_lib.frontend.afe import models, model_attributes -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib.test_utils import mock +from autotest.frontend import setup_test_environment +from autotest.frontend import thread_local +from autotest.frontend.afe import models, model_attributes +from autotest.client.common_lib import global_config +from autotest.client.common_lib.test_utils import mock class FrontendTestMixin(object): def _fill_in_test_data(self): diff --git a/frontend/afe/json_rpc/common.py b/frontend/afe/json_rpc/common.py index dcd6998c87..2994a89d86 100644 --- a/frontend/afe/json_rpc/common.py +++ b/frontend/afe/json_rpc/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/frontend/afe/management.py b/frontend/afe/management.py index 4f6066cd81..3da8209b04 100644 --- a/frontend/afe/management.py +++ b/frontend/afe/management.py @@ -3,11 +3,11 @@ from django.db.models import signals from django.contrib import auth # In this file, it is critical that we import models *just like this*. In -# particular, we *cannot* do import common; from autotest_lib... import models. +# particular, we *cannot* do import common; from autotest... import models. # This is because when we pass the models module to signal.connect(), it # calls id() on the module, and the id() of a module can differ depending on how # it was imported. For that reason, we must import models as Django does -- not -# through the autotest_lib magic set up through common.py. If you do that, the +# through the autotest magic set up through common.py. If you do that, the # connection won't work and the dispatcher will simply never call the method. from frontend.afe import models diff --git a/frontend/afe/model_attributes.py b/frontend/afe/model_attributes.py index 968085de4e..03655e2037 100644 --- a/frontend/afe/model_attributes.py +++ b/frontend/afe/model_attributes.py @@ -2,7 +2,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import enum +from autotest.client.common_lib import enum # common enums for Job attributes diff --git a/frontend/afe/model_logic.py b/frontend/afe/model_logic.py index 362b3ca6bd..57870aea4e 100644 --- a/frontend/afe/model_logic.py +++ b/frontend/afe/model_logic.py @@ -8,7 +8,7 @@ from django.db.models.sql import query import django.db.models.sql.where from django.utils import datastructures -from autotest_lib.frontend.afe import readonly_connection +from autotest.frontend.afe import readonly_connection class ValidationError(Exception): """\ diff --git a/frontend/afe/models.py b/frontend/afe/models.py index 171faf2909..98a07ba8dc 100644 --- a/frontend/afe/models.py +++ b/frontend/afe/models.py @@ -6,10 +6,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend.afe import model_logic, model_attributes -from autotest_lib.frontend import settings, thread_local -from autotest_lib.client.common_lib import enum, host_protections, global_config -from autotest_lib.client.common_lib import host_queue_entry_states +from autotest.frontend.afe import model_logic, model_attributes +from autotest.frontend import settings, thread_local +from autotest.client.common_lib import enum, host_protections, global_config +from autotest.client.common_lib import host_queue_entry_states # job options and user preferences DEFAULT_REBOOT_BEFORE = model_attributes.RebootBefore.IF_DIRTY diff --git a/frontend/afe/models_test.py b/frontend/afe/models_test.py index 1e24cce128..74b2942635 100755 --- a/frontend/afe/models_test.py +++ b/frontend/afe/models_test.py @@ -5,10 +5,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend.afe import frontend_test_utils -from autotest_lib.frontend.afe import models, model_attributes, model_logic -from autotest_lib.client.common_lib import global_config +from autotest.frontend import setup_django_environment +from autotest.frontend.afe import frontend_test_utils +from autotest.frontend.afe import models, model_attributes, model_logic +from autotest.client.common_lib import global_config class AclGroupTest(unittest.TestCase, diff --git a/frontend/afe/resources.py b/frontend/afe/resources.py index b783115f8d..9027ac7052 100644 --- a/frontend/afe/resources.py +++ b/frontend/afe/resources.py @@ -1,9 +1,9 @@ from django import http -from autotest_lib.frontend.shared import query_lib, resource_lib, exceptions -from autotest_lib.frontend.afe import control_file, models, rpc_utils -from autotest_lib.frontend.afe import model_attributes -from autotest_lib.frontend import thread_local -from autotest_lib.client.common_lib import host_protections +from autotest.frontend.shared import query_lib, resource_lib, exceptions +from autotest.frontend.afe import control_file, models, rpc_utils +from autotest.frontend.afe import model_attributes +from autotest.frontend import thread_local +from autotest.client.common_lib import host_protections class EntryWithInvalid(resource_lib.InstanceEntry): diff --git a/frontend/afe/resources_test.py b/frontend/afe/resources_test.py index 37f5339532..b08c3dd207 100755 --- a/frontend/afe/resources_test.py +++ b/frontend/afe/resources_test.py @@ -7,17 +7,17 @@ import unittest # This has to be done very early. -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config global_config.global_config.override_config_value( 'HOSTS', 'default_protection', 'NO_PROTECTION') -from autotest_lib.client.common_lib import host_protections +from autotest.client.common_lib import host_protections -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend import setup_test_environment +from autotest.frontend import setup_django_environment +from autotest.frontend import setup_test_environment from django.test import client -from autotest_lib.frontend.shared import resource_test_utils -from autotest_lib.frontend.afe import control_file, models, model_attributes +from autotest.frontend.shared import resource_test_utils +from autotest.frontend.afe import control_file, models, model_attributes class AfeResourceTestCase(resource_test_utils.ResourceTestCase): URI_PREFIX = 'http://testserver/afe/server/resources' diff --git a/frontend/afe/rpc_client_lib.py b/frontend/afe/rpc_client_lib.py index 2dd3e1763a..581275b584 100644 --- a/frontend/afe/rpc_client_lib.py +++ b/frontend/afe/rpc_client_lib.py @@ -7,7 +7,7 @@ import getpass, os from json_rpc import proxy -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils class AuthError(Exception): @@ -35,5 +35,5 @@ def _base_authorization_headers(username, server): authorization_headers = utils.import_site_function( - __file__, 'autotest_lib.frontend.afe.site_rpc_client_lib', + __file__, 'autotest.frontend.afe.site_rpc_client_lib', 'authorization_headers', _base_authorization_headers) diff --git a/frontend/afe/rpc_handler.py b/frontend/afe/rpc_handler.py index 52c0adfec6..49d9338331 100644 --- a/frontend/afe/rpc_handler.py +++ b/frontend/afe/rpc_handler.py @@ -6,10 +6,10 @@ __author__ = 'showard@google.com (Steve Howard)' import traceback, pydoc, re, urllib, logging, logging.handlers, inspect -from autotest_lib.frontend.afe.json_rpc import serviceHandler -from autotest_lib.frontend.afe import models, rpc_utils -from autotest_lib.client.common_lib import global_config -from autotest_lib.frontend.afe import rpcserver_logging +from autotest.frontend.afe.json_rpc import serviceHandler +from autotest.frontend.afe import models, rpc_utils +from autotest.client.common_lib import global_config +from autotest.frontend.afe import rpcserver_logging LOGGING_REGEXPS = [r'.*add_.*', r'delete_.*', diff --git a/frontend/afe/rpc_interface.py b/frontend/afe/rpc_interface.py index 109e5afa82..1ae9c36e81 100644 --- a/frontend/afe/rpc_interface.py +++ b/frontend/afe/rpc_interface.py @@ -34,9 +34,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend.afe import models, model_logic, model_attributes -from autotest_lib.frontend.afe import control_file, rpc_utils -from autotest_lib.client.common_lib import global_config +from autotest.frontend.afe import models, model_logic, model_attributes +from autotest.frontend.afe import control_file, rpc_utils +from autotest.client.common_lib import global_config # labels diff --git a/frontend/afe/rpc_interface_unittest.py b/frontend/afe/rpc_interface_unittest.py index 42a9e61966..f01fb61575 100755 --- a/frontend/afe/rpc_interface_unittest.py +++ b/frontend/afe/rpc_interface_unittest.py @@ -5,12 +5,12 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend.afe import frontend_test_utils +from autotest.frontend import setup_django_environment +from autotest.frontend.afe import frontend_test_utils from django.db import connection -from autotest_lib.frontend.afe import models, rpc_interface, frontend_test_utils -from autotest_lib.frontend.afe import model_logic, model_attributes -from autotest_lib.client.common_lib import global_config +from autotest.frontend.afe import models, rpc_interface, frontend_test_utils +from autotest.frontend.afe import model_logic, model_attributes +from autotest.client.common_lib import global_config _hqe_status = models.HostQueueEntry.Status diff --git a/frontend/afe/rpc_utils.py b/frontend/afe/rpc_utils.py index 7250d9266e..93df402da8 100644 --- a/frontend/afe/rpc_utils.py +++ b/frontend/afe/rpc_utils.py @@ -7,7 +7,7 @@ import datetime, os, sys, inspect import django.http -from autotest_lib.frontend.afe import models, model_logic, model_attributes +from autotest.frontend.afe import models, model_logic, model_attributes NULL_DATETIME = datetime.datetime.max NULL_DATE = datetime.date.max diff --git a/frontend/afe/rpcserver_logging.py b/frontend/afe/rpcserver_logging.py index 95d09e2c32..3b1736960e 100644 --- a/frontend/afe/rpcserver_logging.py +++ b/frontend/afe/rpcserver_logging.py @@ -3,7 +3,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config config = global_config.global_config diff --git a/frontend/afe/urls.py b/frontend/afe/urls.py index 55fe0f0143..956b35ac71 100644 --- a/frontend/afe/urls.py +++ b/frontend/afe/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import defaults -from autotest_lib.frontend import settings, urls_common -from autotest_lib.frontend.afe.feeds import feed -from autotest_lib.frontend.afe import resources +from autotest.frontend import settings, urls_common +from autotest.frontend.afe.feeds import feed +from autotest.frontend.afe import resources feeds = { 'jobs' : feed.JobFeed diff --git a/frontend/afe/views.py b/frontend/afe/views.py index f304bcbaa2..1609d28758 100644 --- a/frontend/afe/views.py +++ b/frontend/afe/views.py @@ -3,13 +3,13 @@ from django.http import HttpResponse, HttpResponsePermanentRedirect from django.http import HttpResponseServerError from django.template import Context, loader -from autotest_lib.client.common_lib import utils -from autotest_lib.frontend import views_common -from autotest_lib.frontend.afe import models, rpc_handler, rpc_interface -from autotest_lib.frontend.afe import rpc_utils +from autotest.client.common_lib import utils +from autotest.frontend import views_common +from autotest.frontend.afe import models, rpc_handler, rpc_interface +from autotest.frontend.afe import rpc_utils site_rpc_interface = utils.import_site_module( - __file__, 'autotest_lib.frontend.afe.site_rpc_interface', + __file__, 'autotest.frontend.afe.site_rpc_interface', dummy=object()) # since site_rpc_interface is later in the list, its methods will override those diff --git a/frontend/apache_auth.py b/frontend/apache_auth.py index 4ed1471615..3d0ccf7cfe 100644 --- a/frontend/apache_auth.py +++ b/frontend/apache_auth.py @@ -3,8 +3,8 @@ from django.contrib import auth from django import http -from autotest_lib.frontend import thread_local -from autotest_lib.frontend.afe import models, management +from autotest.frontend import thread_local +from autotest.frontend.afe import models, management DEBUG_USER = 'debug_user' diff --git a/frontend/common.py b/frontend/common.py index 0a5eb450af..228568bf49 100644 --- a/frontend/common.py +++ b/frontend/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/frontend/db/backends/afe/base.py b/frontend/db/backends/afe/base.py index 6d617d20dc..067abacbe5 100644 --- a/frontend/db/backends/afe/base.py +++ b/frontend/db/backends/afe/base.py @@ -11,7 +11,7 @@ class DatabaseOperations(MySQLOperations): - compiler_module = "autotest_lib.frontend.db.backends.afe.compiler" + compiler_module = "autotest.frontend.db.backends.afe.compiler" class DatabaseWrapper(MySQLDatabaseWrapper): diff --git a/frontend/db/backends/afe/compiler.py b/frontend/db/backends/afe/compiler.py index 9971415587..943de50d8e 100644 --- a/frontend/db/backends/afe/compiler.py +++ b/frontend/db/backends/afe/compiler.py @@ -1,5 +1,5 @@ from django.db.backends.mysql import compiler as mysql_compiler -from autotest_lib.frontend.afe.model_logic import _quote_name +from autotest.frontend.afe.model_logic import _quote_name class SQLCompiler(mysql_compiler.SQLCompiler): def get_from_clause(self): diff --git a/frontend/db/backends/afe_sqlite/base.py b/frontend/db/backends/afe_sqlite/base.py index 49cfb04de5..81f28d7965 100644 --- a/frontend/db/backends/afe_sqlite/base.py +++ b/frontend/db/backends/afe_sqlite/base.py @@ -6,7 +6,7 @@ class DatabaseOperations(SQLiteDatabaseOperations): - compiler_module = "autotest_lib.frontend.db.backends.afe_sqlite.compiler" + compiler_module = "autotest.frontend.db.backends.afe_sqlite.compiler" class DatabaseWrapper(SQLiteDatabaseWrapper): diff --git a/frontend/db/backends/afe_sqlite/compiler.py b/frontend/db/backends/afe_sqlite/compiler.py index 4e5e27e1fa..c767b78d55 100644 --- a/frontend/db/backends/afe_sqlite/compiler.py +++ b/frontend/db/backends/afe_sqlite/compiler.py @@ -1,5 +1,5 @@ from django.db.models.sql import compiler -from autotest_lib.frontend.afe.model_logic import _quote_name +from autotest.frontend.afe.model_logic import _quote_name class SQLCompiler(compiler.SQLCompiler): def get_from_clause(self): diff --git a/frontend/frontend_unittest.py b/frontend/frontend_unittest.py index cea9a8f089..5fad5b4df2 100755 --- a/frontend/frontend_unittest.py +++ b/frontend/frontend_unittest.py @@ -5,10 +5,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend import setup_test_environment -from autotest_lib.frontend.afe import test, readonly_connection -from autotest_lib.client.common_lib import global_config +from autotest.frontend import setup_django_environment +from autotest.frontend import setup_test_environment +from autotest.frontend.afe import test, readonly_connection +from autotest.client.common_lib import global_config _APP_DIR = os.path.join(os.path.dirname(__file__), 'afe') diff --git a/frontend/make_superuser.py b/frontend/make_superuser.py index e3b27941c8..5b25926c6f 100755 --- a/frontend/make_superuser.py +++ b/frontend/make_superuser.py @@ -6,7 +6,7 @@ import common import MySQLdb import sys -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config if (len(sys.argv) < 2 or [arg for arg in sys.argv[1:] if arg.startswith('-')]): diff --git a/frontend/migrations/009_add_timeout_to_jobs.py b/frontend/migrations/009_add_timeout_to_jobs.py index 819a4927f2..be0b78130c 100644 --- a/frontend/migrations/009_add_timeout_to_jobs.py +++ b/frontend/migrations/009_add_timeout_to_jobs.py @@ -1,4 +1,4 @@ -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config def migrate_up(manager): # Add the column with a default first, and then drop the default. diff --git a/frontend/migrations/010_add_protection_to_hosts.py b/frontend/migrations/010_add_protection_to_hosts.py index fc01b77112..c6bb710e4d 100644 --- a/frontend/migrations/010_add_protection_to_hosts.py +++ b/frontend/migrations/010_add_protection_to_hosts.py @@ -1,4 +1,4 @@ -from autotest_lib.client.common_lib import global_config, host_protections +from autotest.client.common_lib import global_config, host_protections def migrate_up(manager): manager.execute_script(ADD_PROTECTION_COLUMN) diff --git a/frontend/migrations/044_rename_afe_tables.py b/frontend/migrations/044_rename_afe_tables.py index 169e2d1d2d..7f58c1b22e 100644 --- a/frontend/migrations/044_rename_afe_tables.py +++ b/frontend/migrations/044_rename_afe_tables.py @@ -2,7 +2,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.database import db_utils +from autotest.database import db_utils ORIG_NAMES = ( diff --git a/frontend/migrations/045_test_planner_framework.py b/frontend/migrations/045_test_planner_framework.py index c1cd837412..732243255b 100644 --- a/frontend/migrations/045_test_planner_framework.py +++ b/frontend/migrations/045_test_planner_framework.py @@ -2,7 +2,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.database import migrate +from autotest.database import migrate UP_SQL = """\ BEGIN; diff --git a/frontend/migrations/046_merge_databases.py b/frontend/migrations/046_merge_databases.py index 51a1bfaa92..9799f28bf9 100644 --- a/frontend/migrations/046_merge_databases.py +++ b/frontend/migrations/046_merge_databases.py @@ -2,10 +2,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.database import db_utils, migrate +from autotest.database import db_utils, migrate TKO_MIGRATION_NAME = '031_rename_tko_tables' -migrations_module = __import__('autotest_lib.tko.migrations', globals(), +migrations_module = __import__('autotest.tko.migrations', globals(), locals(), [TKO_MIGRATION_NAME]) tko_migration = getattr(migrations_module, TKO_MIGRATION_NAME) diff --git a/frontend/migrations/059_drone_sets_permissions.py b/frontend/migrations/059_drone_sets_permissions.py index a359ffa582..3418b4cfa4 100644 --- a/frontend/migrations/059_drone_sets_permissions.py +++ b/frontend/migrations/059_drone_sets_permissions.py @@ -2,7 +2,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.database import db_utils +from autotest.database import db_utils UP_SQL = """ SET @group_id = (SELECT id FROM auth_group WHERE name = 'Basic Admin'); diff --git a/frontend/migrations/061_drone_sets_permissions_proper.py b/frontend/migrations/061_drone_sets_permissions_proper.py index 28744d6686..759a88f7ed 100644 --- a/frontend/migrations/061_drone_sets_permissions_proper.py +++ b/frontend/migrations/061_drone_sets_permissions_proper.py @@ -3,11 +3,11 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import settings -from autotest_lib.database import db_utils +from autotest.frontend import settings +from autotest.database import db_utils AFE_MIGRATION_NAME = '059_drone_sets_permissions' -migrations_module = __import__('autotest_lib.frontend.migrations', globals(), +migrations_module = __import__('autotest.frontend.migrations', globals(), locals(), [AFE_MIGRATION_NAME]) migration_059 = getattr(migrations_module, AFE_MIGRATION_NAME) diff --git a/frontend/migrations/062_drone_sets_unique.py b/frontend/migrations/062_drone_sets_unique.py index 6774497397..3b394a9455 100644 --- a/frontend/migrations/062_drone_sets_unique.py +++ b/frontend/migrations/062_drone_sets_unique.py @@ -2,7 +2,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.database import db_utils +from autotest.database import db_utils UP_SQL = """ CREATE INDEX afe_drone_sets_drones_droneset_ibfk diff --git a/frontend/migrations/common.py b/frontend/migrations/common.py index 3b244b4d1f..7e5a872e2b 100644 --- a/frontend/migrations/common.py +++ b/frontend/migrations/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/frontend/settings.py b/frontend/settings.py index cb724ed887..05b7e9ea9d 100644 --- a/frontend/settings.py +++ b/frontend/settings.py @@ -5,7 +5,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config c = global_config.global_config _section = 'AUTOTEST_WEB' @@ -26,7 +26,7 @@ def _get_config(config_key, default=None): return c.get_config_value(_section, config_key, default=default) AUTOTEST_DEFAULT = { - 'ENGINE': 'autotest_lib.frontend.db.backends.afe', + 'ENGINE': 'autotest.frontend.db.backends.afe', 'PORT': '', 'HOST': _get_config("host"), 'NAME': _get_config("database"), diff --git a/frontend/setup.py b/frontend/setup.py index c2deafe6c1..930bc93e35 100644 --- a/frontend/setup.py +++ b/frontend/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up fe_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/frontend/setup_django_environment.py b/frontend/setup_django_environment.py index 7e59ed7182..e0ab0151c7 100644 --- a/frontend/setup_django_environment.py +++ b/frontend/setup_django_environment.py @@ -3,7 +3,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import settings +from autotest.frontend import settings management.setup_environ(settings) diff --git a/frontend/setup_test_environment.py b/frontend/setup_test_environment.py index 687ef0aa7e..5ed02bfc5a 100644 --- a/frontend/setup_test_environment.py +++ b/frontend/setup_test_environment.py @@ -12,11 +12,11 @@ # from it before we set stuff on it. getattr(settings, 'DATABASES') settings.DATABASES['default']['ENGINE'] = ( - 'autotest_lib.frontend.db.backends.afe_sqlite') + 'autotest.frontend.db.backends.afe_sqlite') settings.DATABASES['default']['NAME'] = ':memory:' from django.db import connection -from autotest_lib.frontend.afe import readonly_connection +from autotest.frontend.afe import readonly_connection def run_syncdb(verbosity=0): management.call_command('syncdb', verbosity=verbosity, interactive=False) diff --git a/frontend/shared/common.py b/frontend/shared/common.py index 9356d20a9a..c18a7eb4cc 100644 --- a/frontend/shared/common.py +++ b/frontend/shared/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/frontend/shared/query_lib.py b/frontend/shared/query_lib.py index 5515b60381..d88247fdc6 100644 --- a/frontend/shared/query_lib.py +++ b/frontend/shared/query_lib.py @@ -1,4 +1,4 @@ -from autotest_lib.frontend.shared import exceptions +from autotest.frontend.shared import exceptions class ConstraintError(Exception): """Raised when an error occurs applying a Constraint.""" diff --git a/frontend/shared/resource_lib.py b/frontend/shared/resource_lib.py index 86cc583af7..b251f52670 100644 --- a/frontend/shared/resource_lib.py +++ b/frontend/shared/resource_lib.py @@ -4,8 +4,8 @@ from django.core import urlresolvers from django.utils import datastructures import simplejson -from autotest_lib.frontend.shared import exceptions, query_lib -from autotest_lib.frontend.afe import model_logic +from autotest.frontend.shared import exceptions, query_lib +from autotest.frontend.afe import model_logic _JSON_CONTENT_TYPE = 'application/json' diff --git a/frontend/shared/resource_test_utils.py b/frontend/shared/resource_test_utils.py index 8cb742fd00..4ab942b015 100644 --- a/frontend/shared/resource_test_utils.py +++ b/frontend/shared/resource_test_utils.py @@ -1,7 +1,7 @@ import operator, unittest import simplejson from django.test import client -from autotest_lib.frontend.afe import frontend_test_utils, models as afe_models +from autotest.frontend.afe import frontend_test_utils, models as afe_models class ResourceTestCase(unittest.TestCase, frontend_test_utils.FrontendTestMixin): diff --git a/frontend/shared/rest_client.py b/frontend/shared/rest_client.py index 7294e40a99..f627f83164 100644 --- a/frontend/shared/rest_client.py +++ b/frontend/shared/rest_client.py @@ -1,8 +1,8 @@ import copy, getpass, logging, pprint, re, urllib, urlparse import httplib2 from django.utils import datastructures, simplejson -from autotest_lib.frontend.afe import rpc_client_lib -from autotest_lib.client.common_lib import utils +from autotest.frontend.afe import rpc_client_lib +from autotest.client.common_lib import utils _request_headers = {} @@ -134,7 +134,7 @@ def _do_request(self, method, uri, query_parameters, encoded_body): logging.debug(entity_body) site_verify = utils.import_site_function( - __file__, 'autotest_lib.frontend.shared.site_rest_client', + __file__, 'autotest.frontend.shared.site_rest_client', 'site_verify_response', _site_verify_response_default) headers, response_body = self._http.request( full_uri, method, body=entity_body, diff --git a/frontend/tko/common.py b/frontend/tko/common.py index 9356d20a9a..c18a7eb4cc 100644 --- a/frontend/tko/common.py +++ b/frontend/tko/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/frontend/tko/csv_encoder.py b/frontend/tko/csv_encoder.py index d418fe554a..5a045f47a0 100644 --- a/frontend/tko/csv_encoder.py +++ b/frontend/tko/csv_encoder.py @@ -4,7 +4,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend.afe import rpc_utils +from autotest.frontend.afe import rpc_utils class CsvEncoder(object): def __init__(self, request, response): diff --git a/frontend/tko/csv_encoder_unittest.py b/frontend/tko/csv_encoder_unittest.py index 44a6adaae9..da78de5923 100755 --- a/frontend/tko/csv_encoder_unittest.py +++ b/frontend/tko/csv_encoder_unittest.py @@ -5,9 +5,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend import setup_test_environment -from autotest_lib.frontend.tko import csv_encoder +from autotest.frontend import setup_django_environment +from autotest.frontend import setup_test_environment +from autotest.frontend.tko import csv_encoder class CsvEncodingTest(unittest.TestCase): def _make_request(self, method, columns=None): diff --git a/frontend/tko/graphing_utils.py b/frontend/tko/graphing_utils.py index 44a5e11359..466d935f0c 100644 --- a/frontend/tko/graphing_utils.py +++ b/frontend/tko/graphing_utils.py @@ -20,11 +20,11 @@ import matplotlib.figure, matplotlib.backends.backend_agg import StringIO, colorsys, PIL.Image, PIL.ImageChops -from autotest_lib.frontend.afe import readonly_connection -from autotest_lib.frontend.afe.model_logic import ValidationError +from autotest.frontend.afe import readonly_connection +from autotest.frontend.afe.model_logic import ValidationError from simplejson import encoder -from autotest_lib.client.common_lib import global_config -from autotest_lib.frontend.tko import models, tko_rpc_utils +from autotest.client.common_lib import global_config +from autotest.frontend.tko import models, tko_rpc_utils _FIGURE_DPI = 100 _FIGURE_WIDTH_IN = 10 diff --git a/frontend/tko/models.py b/frontend/tko/models.py index 9b0d408fe1..0c30568340 100644 --- a/frontend/tko/models.py +++ b/frontend/tko/models.py @@ -1,6 +1,6 @@ from django.db import models as dbmodels, connection from django.utils import datastructures -from autotest_lib.frontend.afe import model_logic, readonly_connection +from autotest.frontend.afe import model_logic, readonly_connection _quote_name = connection.ops.quote_name diff --git a/frontend/tko/resources.py b/frontend/tko/resources.py index 99b7267ad8..15d9e1fea5 100644 --- a/frontend/tko/resources.py +++ b/frontend/tko/resources.py @@ -1,5 +1,5 @@ -from autotest_lib.frontend.shared import query_lib, resource_lib -from autotest_lib.frontend.tko import models +from autotest.frontend.shared import query_lib, resource_lib +from autotest.frontend.tko import models class TestResult(resource_lib.InstanceEntry): model = models.Test diff --git a/frontend/tko/resources_test.py b/frontend/tko/resources_test.py index c5429e2e84..f5d36f376c 100755 --- a/frontend/tko/resources_test.py +++ b/frontend/tko/resources_test.py @@ -5,11 +5,11 @@ except ImportError: import common import unittest -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend import setup_test_environment -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.frontend.shared import resource_test_utils -from autotest_lib.frontend.tko import models, rpc_interface_unittest +from autotest.frontend import setup_django_environment +from autotest.frontend import setup_test_environment +from autotest.client.common_lib.test_utils import mock +from autotest.frontend.shared import resource_test_utils +from autotest.frontend.tko import models, rpc_interface_unittest class TkoResourceTestCase(resource_test_utils.ResourceTestCase, diff --git a/frontend/tko/rpc_interface.py b/frontend/tko/rpc_interface.py index f695675f12..93fea77dd7 100644 --- a/frontend/tko/rpc_interface.py +++ b/frontend/tko/rpc_interface.py @@ -1,9 +1,9 @@ import os, pickle, datetime, itertools, operator from django.db import models as dbmodels -from autotest_lib.frontend.afe import rpc_utils, model_logic -from autotest_lib.frontend.afe import models as afe_models, readonly_connection -from autotest_lib.frontend.tko import models, tko_rpc_utils, graphing_utils -from autotest_lib.frontend.tko import preconfigs +from autotest.frontend.afe import rpc_utils, model_logic +from autotest.frontend.afe import models as afe_models, readonly_connection +from autotest.frontend.tko import models, tko_rpc_utils, graphing_utils +from autotest.frontend.tko import preconfigs # table/spreadsheet view support diff --git a/frontend/tko/rpc_interface_unittest.py b/frontend/tko/rpc_interface_unittest.py index 5070916e3a..f017b8959e 100755 --- a/frontend/tko/rpc_interface_unittest.py +++ b/frontend/tko/rpc_interface_unittest.py @@ -5,11 +5,11 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend import setup_test_environment -from autotest_lib.client.common_lib.test_utils import mock +from autotest.frontend import setup_django_environment +from autotest.frontend import setup_test_environment +from autotest.client.common_lib.test_utils import mock from django.db import connection -from autotest_lib.frontend.tko import models, rpc_interface +from autotest.frontend.tko import models, rpc_interface # this will need to be updated when the view changes for the test to be # consistent with reality diff --git a/frontend/tko/tko_rpc_utils.py b/frontend/tko/tko_rpc_utils.py index b702c63bc4..15484f6931 100644 --- a/frontend/tko/tko_rpc_utils.py +++ b/frontend/tko/tko_rpc_utils.py @@ -1,6 +1,6 @@ -from autotest_lib.frontend.afe import rpc_utils -from autotest_lib.client.common_lib import kernel_versions -from autotest_lib.frontend.tko import models +from autotest.frontend.afe import rpc_utils +from autotest.client.common_lib import kernel_versions +from autotest.frontend.tko import models class TooManyRowsError(Exception): """ diff --git a/frontend/tko/urls.py b/frontend/tko/urls.py index 1e88077579..cfa34542ad 100644 --- a/frontend/tko/urls.py +++ b/frontend/tko/urls.py @@ -3,8 +3,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import settings, urls_common -from autotest_lib.frontend.tko import resources +from autotest.frontend import settings, urls_common +from autotest.frontend.tko import resources urlpatterns, debug_patterns = ( urls_common.generate_patterns('frontend.tko', 'TkoClient')) diff --git a/frontend/tko/views.py b/frontend/tko/views.py index 2b29c9f88e..72e8d7ae95 100644 --- a/frontend/tko/views.py +++ b/frontend/tko/views.py @@ -1,7 +1,7 @@ import django.http -from autotest_lib.frontend.tko import rpc_interface, graphing_utils -from autotest_lib.frontend.tko import csv_encoder -from autotest_lib.frontend.afe import rpc_handler, rpc_utils +from autotest.frontend.tko import rpc_interface, graphing_utils +from autotest.frontend.tko import csv_encoder +from autotest.frontend.afe import rpc_handler, rpc_utils rpc_handler_obj = rpc_handler.RpcHandler((rpc_interface,), document_module=rpc_interface) diff --git a/frontend/urls_common.py b/frontend/urls_common.py index 01a914f21a..03a44703d9 100644 --- a/frontend/urls_common.py +++ b/frontend/urls_common.py @@ -21,7 +21,7 @@ def generate_patterns(django_name, gwt_name): debug_pattern_list = defaults.patterns('', # for GWT hosted mode (r'^(?Pautotest.*)', - 'autotest_lib.frontend.afe.views.gwt_forward'), + 'autotest.frontend.afe.views.gwt_forward'), # for GWT compiled files (r'^client/(?P.*)$', 'django.views.static.serve', diff --git a/mirror/common.py b/mirror/common.py index 0a5eb450af..228568bf49 100644 --- a/mirror/common.py +++ b/mirror/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/mirror/config-sample.py b/mirror/config-sample.py index 131224db4e..a5f8a44169 100644 --- a/mirror/config-sample.py +++ b/mirror/config-sample.py @@ -25,8 +25,8 @@ will happen with the new kernels other than being included in the known kernels database so future lookups will not consider them new again) """ -from autotest_lib.mirror import database, source as source_module -from autotest_lib.mirror import trigger as trigger_module +from autotest.mirror import database, source as source_module +from autotest.mirror import trigger as trigger_module # create a database object where to store information about known files db = database.dict_database('rsync.kernel.org.db') diff --git a/mirror/database_unittest.py b/mirror/database_unittest.py index 60e08facef..00c5afcd22 100755 --- a/mirror/database_unittest.py +++ b/mirror/database_unittest.py @@ -7,8 +7,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.mirror import database -from autotest_lib.client.common_lib.test_utils import mock +from autotest.mirror import database +from autotest.client.common_lib.test_utils import mock class dict_database_unittest(unittest.TestCase): _path = 'somepath.db' diff --git a/mirror/mirror b/mirror/mirror index 2dfe606b0d..d42acfaccd 100755 --- a/mirror/mirror +++ b/mirror/mirror @@ -6,7 +6,7 @@ try: import autotest.common except ImportError: import common -from autotest_lib.mirror import trigger +from autotest.mirror import trigger default_config_path = os.path.expanduser( os.path.join(os.path.dirname(__file__), 'config.py')) diff --git a/mirror/setup.py b/mirror/setup.py index 516e3ac426..bf82347544 100644 --- a/mirror/setup.py +++ b/mirror/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up mirror_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/mirror/source.py b/mirror/source.py index 4c6e51c461..437cded32b 100644 --- a/mirror/source.py +++ b/mirror/source.py @@ -2,8 +2,8 @@ import os, re, time, urllib2, urlparse, HTMLParser -from autotest_lib.mirror import database -from autotest_lib.client.common_lib import utils +from autotest.mirror import database +from autotest.client.common_lib import utils class source(object): diff --git a/mirror/source_unittest.py b/mirror/source_unittest.py index a94753128b..11367abbcd 100755 --- a/mirror/source_unittest.py +++ b/mirror/source_unittest.py @@ -7,8 +7,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.mirror import source -from autotest_lib.client.common_lib.test_utils import mock +from autotest.mirror import source +from autotest.client.common_lib.test_utils import mock class common_source(unittest.TestCase): diff --git a/mirror/trigger.py b/mirror/trigger.py index f1b509163e..8019f794c9 100644 --- a/mirror/trigger.py +++ b/mirror/trigger.py @@ -1,6 +1,6 @@ import email, os, re, smtplib -from autotest_lib.server import frontend +from autotest.server import frontend class trigger(object): """ diff --git a/mirror/trigger_unittest.py b/mirror/trigger_unittest.py index 766f59a166..fd51ef9dbe 100755 --- a/mirror/trigger_unittest.py +++ b/mirror/trigger_unittest.py @@ -7,8 +7,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.mirror import trigger -from autotest_lib.client.common_lib.test_utils import mock +from autotest.mirror import trigger +from autotest.client.common_lib.test_utils import mock class map_action_unittest(unittest.TestCase): diff --git a/scheduler/archive_results.control.srv b/scheduler/archive_results.control.srv index 93b25ffe4e..adad28593c 100644 --- a/scheduler/archive_results.control.srv +++ b/scheduler/archive_results.control.srv @@ -1,4 +1,4 @@ -from autotest_lib.scheduler import archive_results +from autotest.scheduler import archive_results archiver = archive_results.ResultsArchiver() archiver.archive_results(job.resultdir) diff --git a/scheduler/archive_results.py b/scheduler/archive_results.py index af2894c2b5..1b4c6dc76e 100755 --- a/scheduler/archive_results.py +++ b/scheduler/archive_results.py @@ -5,8 +5,8 @@ except ImportError: import common import logging -from autotest_lib.client.common_lib import global_config, utils -from autotest_lib.scheduler import drone_utility +from autotest.client.common_lib import global_config, utils +from autotest.scheduler import drone_utility class BaseResultsArchiver(object): def archive_results(self, path): @@ -24,5 +24,5 @@ def archive_results(self, path): ResultsArchiver = utils.import_site_class( - __file__, 'autotest_lib.scheduler.site_archive_results', + __file__, 'autotest.scheduler.site_archive_results', 'SiteResultsArchiver', BaseResultsArchiver) diff --git a/scheduler/autotest-scheduler b/scheduler/autotest-scheduler index ab36eac594..a546518992 100755 --- a/scheduler/autotest-scheduler +++ b/scheduler/autotest-scheduler @@ -7,7 +7,7 @@ try: except ImportError: import common -from autotest_lib.scheduler import monitor_db +from autotest.scheduler import monitor_db if __name__ == '__main__': monitor_db.main() diff --git a/scheduler/autotest-scheduler-watcher b/scheduler/autotest-scheduler-watcher index aaaa7c29a3..80de7c3e06 100755 --- a/scheduler/autotest-scheduler-watcher +++ b/scheduler/autotest-scheduler-watcher @@ -7,7 +7,7 @@ try: except ImportError: import common -from autotest_lib.scheduler import monitor_db_watcher +from autotest.scheduler import monitor_db_watcher if __name__ == '__main__': monitor_db_watcher.main() diff --git a/scheduler/common.py b/scheduler/common.py index 0a5eb450af..228568bf49 100644 --- a/scheduler/common.py +++ b/scheduler/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/scheduler/drone_manager.py b/scheduler/drone_manager.py index 5809f8e095..0b2a702f26 100644 --- a/scheduler/drone_manager.py +++ b/scheduler/drone_manager.py @@ -4,9 +4,9 @@ except ImportError: import common import logging -from autotest_lib.client.common_lib import error, global_config -from autotest_lib.scheduler import email_manager, drone_utility, drones -from autotest_lib.scheduler import scheduler_config +from autotest.client.common_lib import error, global_config +from autotest.scheduler import email_manager, drone_utility, drones +from autotest.scheduler import scheduler_config # results on drones will be placed under the drone_installation_directory in a diff --git a/scheduler/drone_manager_unittest.py b/scheduler/drone_manager_unittest.py index 1656247736..0bcc2d625f 100755 --- a/scheduler/drone_manager_unittest.py +++ b/scheduler/drone_manager_unittest.py @@ -5,10 +5,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.scheduler import drone_manager, drone_utility, drones -from autotest_lib.scheduler import scheduler_config +from autotest.client.common_lib import global_config +from autotest.client.common_lib.test_utils import mock +from autotest.scheduler import drone_manager, drone_utility, drones +from autotest.scheduler import scheduler_config class MockDrone(drones._AbstractDrone): def __init__(self, name, active_processes=0, max_processes=10, diff --git a/scheduler/drone_utility.py b/scheduler/drone_utility.py index 39ce79cc17..02c432e009 100755 --- a/scheduler/drone_utility.py +++ b/scheduler/drone_utility.py @@ -6,9 +6,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils, global_config, error -from autotest_lib.server import hosts, subcommand -from autotest_lib.scheduler import email_manager, scheduler_config +from autotest.client.common_lib import utils, global_config, error +from autotest.server import hosts, subcommand +from autotest.scheduler import email_manager, scheduler_config # An environment variable we add to the environment to enable us to # distinguish processes we started from those that were started by @@ -154,7 +154,7 @@ def refresh(self, pidfile_paths): processes are scanned. """ site_check_parse = utils.import_site_function( - __file__, 'autotest_lib.scheduler.site_drone_utility', + __file__, 'autotest.scheduler.site_drone_utility', 'check_parse', lambda x: False) results = { 'pidfiles' : self._read_pidfiles(pidfile_paths), diff --git a/scheduler/drone_utility_unittest.py b/scheduler/drone_utility_unittest.py index 9e9cbcdc6d..98986c8361 100755 --- a/scheduler/drone_utility_unittest.py +++ b/scheduler/drone_utility_unittest.py @@ -9,9 +9,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.scheduler import drone_utility +from autotest.client.common_lib import global_config +from autotest.client.common_lib.test_utils import mock +from autotest.scheduler import drone_utility class TestDroneUtility(unittest.TestCase): diff --git a/scheduler/drones.py b/scheduler/drones.py index 688085a19a..ed945dc0f0 100644 --- a/scheduler/drones.py +++ b/scheduler/drones.py @@ -3,8 +3,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.scheduler import drone_utility, email_manager -from autotest_lib.client.common_lib import error, global_config +from autotest.scheduler import drone_utility, email_manager +from autotest.client.common_lib import error, global_config AUTOTEST_INSTALL_DIR = global_config.global_config.get_config_value('SCHEDULER', diff --git a/scheduler/drones_unittest.py b/scheduler/drones_unittest.py index d395288cce..fcacc1b43d 100755 --- a/scheduler/drones_unittest.py +++ b/scheduler/drones_unittest.py @@ -1,14 +1,14 @@ #!/usr/bin/python -"""Tests for autotest_lib.scheduler.drones.""" +"""Tests for autotest.scheduler.drones.""" import cPickle import common -from autotest_lib.client.common_lib import utils -from autotest_lib.client.common_lib.test_utils import mock, unittest -from autotest_lib.scheduler import drones -from autotest_lib.server.hosts import ssh_host +from autotest.client.common_lib import utils +from autotest.client.common_lib.test_utils import mock, unittest +from autotest.scheduler import drones +from autotest.server.hosts import ssh_host class RemoteDroneTest(unittest.TestCase): diff --git a/scheduler/email_manager.py b/scheduler/email_manager.py index f01bcb1d30..ec4989bce8 100644 --- a/scheduler/email_manager.py +++ b/scheduler/email_manager.py @@ -3,7 +3,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config CONFIG_SECTION = 'SCHEDULER' diff --git a/scheduler/gc_stats_unittest.py b/scheduler/gc_stats_unittest.py index 7ae54e0cf7..5f60036c5e 100755 --- a/scheduler/gc_stats_unittest.py +++ b/scheduler/gc_stats_unittest.py @@ -7,9 +7,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib.test_utils import unittest -from autotest_lib.scheduler import gc_stats +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib.test_utils import unittest +from autotest.scheduler import gc_stats class TestGcStats(unittest.TestCase): diff --git a/scheduler/host_scheduler.py b/scheduler/host_scheduler.py index 8b56ee4b84..9293c96d71 100644 --- a/scheduler/host_scheduler.py +++ b/scheduler/host_scheduler.py @@ -5,14 +5,14 @@ import logging -from autotest_lib.client.common_lib import global_config, utils -from autotest_lib.frontend.afe import models -from autotest_lib.scheduler import metahost_scheduler, scheduler_config -from autotest_lib.scheduler import scheduler_models +from autotest.client.common_lib import global_config, utils +from autotest.frontend.afe import models +from autotest.scheduler import metahost_scheduler, scheduler_config +from autotest.scheduler import scheduler_models get_site_metahost_schedulers = utils.import_site_function( - __file__, 'autotest_lib.scheduler.site_metahost_scheduler', + __file__, 'autotest.scheduler.site_metahost_scheduler', 'get_metahost_schedulers', lambda : ()) @@ -416,7 +416,7 @@ def find_eligible_atomic_group(self, queue_entry): site_host_scheduler = utils.import_site_class( - __file__, 'autotest_lib.scheduler.site_host_scheduler', + __file__, 'autotest.scheduler.site_host_scheduler', 'site_host_scheduler', BaseHostScheduler) diff --git a/scheduler/metahost_scheduler.py b/scheduler/metahost_scheduler.py index 98f49bed8f..728a7dcfaa 100644 --- a/scheduler/metahost_scheduler.py +++ b/scheduler/metahost_scheduler.py @@ -1,4 +1,4 @@ -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils class HostSchedulingUtility(object): """Interface to host availability information from the scheduler.""" diff --git a/scheduler/metahost_scheduler_unittest.py b/scheduler/metahost_scheduler_unittest.py index 8a7c982237..d1cf2e3a9c 100755 --- a/scheduler/metahost_scheduler_unittest.py +++ b/scheduler/metahost_scheduler_unittest.py @@ -5,10 +5,10 @@ except ImportError: import common import unittest -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend import setup_test_environment -from autotest_lib.scheduler import metahost_scheduler, scheduler_models +from autotest.client.common_lib.test_utils import mock +from autotest.frontend import setup_django_environment +from autotest.frontend import setup_test_environment +from autotest.scheduler import metahost_scheduler, scheduler_models class LabelMetahostSchedulerTest(unittest.TestCase): def setUp(self): diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py index e4d5c208e1..f182a1dae8 100644 --- a/scheduler/monitor_db.py +++ b/scheduler/monitor_db.py @@ -8,20 +8,20 @@ import datetime, optparse, os, signal, sys, time, traceback, urllib import logging, gc -from autotest_lib.scheduler import scheduler_logging_config -from autotest_lib.frontend import setup_django_environment +from autotest.scheduler import scheduler_logging_config +from autotest.frontend import setup_django_environment import django.db -from autotest_lib.client.common_lib import global_config, logging_manager -from autotest_lib.client.common_lib import host_protections, utils -from autotest_lib.database import database_connection -from autotest_lib.frontend.afe import models, rpc_utils, readonly_connection -from autotest_lib.frontend.afe import model_attributes -from autotest_lib.scheduler import drone_manager, drones, email_manager -from autotest_lib.scheduler import gc_stats, host_scheduler, monitor_db_cleanup -from autotest_lib.scheduler import status_server, scheduler_config -from autotest_lib.scheduler import scheduler_models +from autotest.client.common_lib import global_config, logging_manager +from autotest.client.common_lib import host_protections, utils +from autotest.database import database_connection +from autotest.frontend.afe import models, rpc_utils, readonly_connection +from autotest.frontend.afe import model_attributes +from autotest.scheduler import drone_manager, drones, email_manager +from autotest.scheduler import gc_stats, host_scheduler, monitor_db_cleanup +from autotest.scheduler import status_server, scheduler_config +from autotest.scheduler import scheduler_models WATCHER_PID_FILE_PREFIX = 'autotest-scheduler-watcher' PID_FILE_PREFIX = 'autotest-scheduler' @@ -56,7 +56,7 @@ def _parser_path_default(install_dir): return os.path.join(install_dir, 'tko', 'parse') _parser_path_func = utils.import_site_function( - __file__, 'autotest_lib.scheduler.site_monitor_db', + __file__, 'autotest.scheduler.site_monitor_db', 'parser_path', _parser_path_default) _parser_path = _parser_path_func(drones.AUTOTEST_INSTALL_DIR) @@ -196,7 +196,7 @@ def main_without_exception_handling(): RESULTS_DIR = args[0] site_init = utils.import_site_function(__file__, - "autotest_lib.scheduler.site_monitor_db", "site_init_monitor_db", + "autotest.scheduler.site_monitor_db", "site_init_monitor_db", _site_init_monitor_db_dummy) site_init() diff --git a/scheduler/monitor_db_cleanup.py b/scheduler/monitor_db_cleanup.py index d8bab116c6..01dfede0c2 100644 --- a/scheduler/monitor_db_cleanup.py +++ b/scheduler/monitor_db_cleanup.py @@ -4,10 +4,10 @@ import datetime, time, logging, random -from autotest_lib.database import database_connection -from autotest_lib.frontend.afe import models -from autotest_lib.scheduler import email_manager, scheduler_config -from autotest_lib.client.common_lib import host_protections +from autotest.database import database_connection +from autotest.frontend.afe import models +from autotest.scheduler import email_manager, scheduler_config +from autotest.client.common_lib import host_protections class PeriodicCleanup(object): diff --git a/scheduler/monitor_db_cleanup_test.py b/scheduler/monitor_db_cleanup_test.py index e2879fb3ef..7ee7bd5938 100755 --- a/scheduler/monitor_db_cleanup_test.py +++ b/scheduler/monitor_db_cleanup_test.py @@ -5,11 +5,11 @@ except ImportError: import common import logging, unittest -from autotest_lib.frontend import setup_django_environment -from autotest_lib.database import database_connection -from autotest_lib.frontend.afe import frontend_test_utils, models -from autotest_lib.scheduler import monitor_db_cleanup, scheduler_config -from autotest_lib.client.common_lib import host_protections +from autotest.frontend import setup_django_environment +from autotest.database import database_connection +from autotest.frontend.afe import frontend_test_utils, models +from autotest.scheduler import monitor_db_cleanup, scheduler_config +from autotest.client.common_lib import host_protections class UserCleanupTest(unittest.TestCase, frontend_test_utils.FrontendTestMixin): def setUp(self): diff --git a/scheduler/monitor_db_functional_test.py b/scheduler/monitor_db_functional_test.py index 0cbc883701..c0a0751c53 100755 --- a/scheduler/monitor_db_functional_test.py +++ b/scheduler/monitor_db_functional_test.py @@ -5,13 +5,13 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import enum, global_config, host_protections -from autotest_lib.database import database_connection -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend.afe import frontend_test_utils, models -from autotest_lib.frontend.afe import model_attributes -from autotest_lib.scheduler import drone_manager, email_manager, host_scheduler -from autotest_lib.scheduler import monitor_db, scheduler_models +from autotest.client.common_lib import enum, global_config, host_protections +from autotest.database import database_connection +from autotest.frontend import setup_django_environment +from autotest.frontend.afe import frontend_test_utils, models +from autotest.frontend.afe import model_attributes +from autotest.scheduler import drone_manager, email_manager, host_scheduler +from autotest.scheduler import monitor_db, scheduler_models # translations necessary for scheduler queries to work with SQLite _re_translator = database_connection.TranslatingDatabase.make_regexp_translator diff --git a/scheduler/monitor_db_unittest.py b/scheduler/monitor_db_unittest.py index c165bc9119..1deb8f9a2f 100755 --- a/scheduler/monitor_db_unittest.py +++ b/scheduler/monitor_db_unittest.py @@ -5,16 +5,16 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend.afe import frontend_test_utils -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib.test_utils import unittest -from autotest_lib.database import database_connection -from autotest_lib.frontend.afe import models -from autotest_lib.scheduler import monitor_db, drone_manager, email_manager -from autotest_lib.scheduler import scheduler_config, gc_stats, host_scheduler -from autotest_lib.scheduler import monitor_db_functional_test -from autotest_lib.scheduler import scheduler_models +from autotest.frontend import setup_django_environment +from autotest.frontend.afe import frontend_test_utils +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib.test_utils import unittest +from autotest.database import database_connection +from autotest.frontend.afe import models +from autotest.scheduler import monitor_db, drone_manager, email_manager +from autotest.scheduler import scheduler_config, gc_stats, host_scheduler +from autotest.scheduler import monitor_db_functional_test +from autotest.scheduler import scheduler_models _DEBUG = False diff --git a/scheduler/monitor_db_watcher.py b/scheduler/monitor_db_watcher.py index 9e1f984482..78f4bc3774 100644 --- a/scheduler/monitor_db_watcher.py +++ b/scheduler/monitor_db_watcher.py @@ -8,11 +8,11 @@ import autotest.common as common except ImportError: import common -from autotest_lib.scheduler import watcher_logging_config -from autotest_lib.client.common_lib import error, global_config, utils -from autotest_lib.client.common_lib import logging_manager -from autotest_lib.scheduler import scheduler_logging_config -from autotest_lib.scheduler import monitor_db +from autotest.scheduler import watcher_logging_config +from autotest.client.common_lib import error, global_config, utils +from autotest.client.common_lib import logging_manager +from autotest.scheduler import scheduler_logging_config +from autotest.scheduler import monitor_db PAUSE_LENGTH = 60 @@ -57,7 +57,7 @@ def handle_sigterm(signum, frame): SiteMonitorProc = utils.import_site_class( - __file__, 'autotest_lib.scheduler.site_monitor_db_watcher', + __file__, 'autotest.scheduler.site_monitor_db_watcher', 'SiteMonitorProc', object) diff --git a/scheduler/scheduler_config.py b/scheduler/scheduler_config.py index 985fd77342..9ede9c9fc4 100644 --- a/scheduler/scheduler_config.py +++ b/scheduler/scheduler_config.py @@ -2,7 +2,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config CONFIG_SECTION = 'SCHEDULER' diff --git a/scheduler/scheduler_logging_config.py b/scheduler/scheduler_logging_config.py index 159a63df01..ba7710575c 100644 --- a/scheduler/scheduler_logging_config.py +++ b/scheduler/scheduler_logging_config.py @@ -3,7 +3,7 @@ except ImportError: import common import logging, os -from autotest_lib.client.common_lib import logging_config +from autotest.client.common_lib import logging_config class SchedulerLoggingConfig(logging_config.LoggingConfig): GLOBAL_LEVEL = logging.INFO diff --git a/scheduler/scheduler_models.py b/scheduler/scheduler_models.py index 3675397c62..5480c7e49d 100644 --- a/scheduler/scheduler_models.py +++ b/scheduler/scheduler_models.py @@ -18,12 +18,12 @@ import datetime, itertools, logging, os, re, sys, time, weakref from django.db import connection -from autotest_lib.client.common_lib import global_config, host_protections -from autotest_lib.client.common_lib import global_config, utils -from autotest_lib.frontend.afe import models, model_attributes -from autotest_lib.database import database_connection -from autotest_lib.scheduler import drone_manager, email_manager -from autotest_lib.scheduler import scheduler_config +from autotest.client.common_lib import global_config, host_protections +from autotest.client.common_lib import global_config, utils +from autotest.frontend.afe import models, model_attributes +from autotest.database import database_connection +from autotest.scheduler import drone_manager, email_manager +from autotest.scheduler import scheduler_config _notify_email_statuses = [] _base_url = None diff --git a/scheduler/scheduler_models_unittest.py b/scheduler/scheduler_models_unittest.py index bcccba0f5b..c2251b3b55 100755 --- a/scheduler/scheduler_models_unittest.py +++ b/scheduler/scheduler_models_unittest.py @@ -5,14 +5,14 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend.afe import frontend_test_utils -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib.test_utils import unittest -from autotest_lib.database import database_connection -from autotest_lib.frontend.afe import models, model_attributes -from autotest_lib.scheduler import monitor_db_functional_test -from autotest_lib.scheduler import scheduler_models +from autotest.frontend import setup_django_environment +from autotest.frontend.afe import frontend_test_utils +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib.test_utils import unittest +from autotest.database import database_connection +from autotest.frontend.afe import models, model_attributes +from autotest.scheduler import monitor_db_functional_test +from autotest.scheduler import scheduler_models _DEBUG = False diff --git a/scheduler/setup.py b/scheduler/setup.py index 825660ffea..b8fb246a8e 100644 --- a/scheduler/setup.py +++ b/scheduler/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version #mostly needed when called one level up scheduler_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/scheduler/status_server.py b/scheduler/status_server.py index f234a21760..38ff3b7934 100644 --- a/scheduler/status_server.py +++ b/scheduler/status_server.py @@ -3,7 +3,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.scheduler import drone_manager, scheduler_config +from autotest.scheduler import drone_manager, scheduler_config _PORT = 13467 diff --git a/scheduler/watcher_logging_config.py b/scheduler/watcher_logging_config.py index 8e526d7f97..f787aee938 100644 --- a/scheduler/watcher_logging_config.py +++ b/scheduler/watcher_logging_config.py @@ -3,7 +3,7 @@ except ImportError: import common import logging -from autotest_lib.client.common_lib import logging_config +from autotest.client.common_lib import logging_config class WatcherLoggingConfig(logging_config.LoggingConfig): def __init__(self, use_console=True): diff --git a/server/autoserv.py b/server/autoserv.py index 3ffa978ad4..7a22b255c0 100644 --- a/server/autoserv.py +++ b/server/autoserv.py @@ -9,7 +9,7 @@ except ImportError: import common -from autotest_lib.client.common_lib.global_config import global_config +from autotest.client.common_lib.global_config import global_config require_atfork = global_config.get_config_value( 'AUTOSERV', 'require_atfork_module', type=bool, default=True) @@ -23,17 +23,17 @@ warnings.filterwarnings('ignore', 'logging module already imported') atfork.stdlib_fixer.fix_logging_module() except ImportError, e: - from autotest_lib.client.common_lib import global_config + from autotest.client.common_lib import global_config if global_config.global_config.get_config_value( 'AUTOSERV', 'require_atfork_module', type=bool, default=False): print >>sys.stderr, 'Please run utils/build_externals.py' print e sys.exit(1) -from autotest_lib.server import server_logging_config -from autotest_lib.server import server_job, utils, autoserv_parser -from autotest_lib.server import autotest_remote -from autotest_lib.client.common_lib import pidfile, logging_manager +from autotest.server import server_logging_config +from autotest.server import server_job, utils, autoserv_parser +from autotest.server import autotest_remote +from autotest.client.common_lib import pidfile, logging_manager def run_autoserv(pid_file_manager, results, parser): # send stdin to /dev/null diff --git a/server/autoserv_parser.py b/server/autoserv_parser.py index a9550392a4..7ec56693d4 100644 --- a/server/autoserv_parser.py +++ b/server/autoserv_parser.py @@ -1,6 +1,6 @@ import os, sys, getopt, optparse -from autotest_lib.client.common_lib import host_protections, utils +from autotest.client.common_lib import host_protections, utils class base_autoserv_parser(object): @@ -141,7 +141,7 @@ def parse_args(self): site_autoserv_parser = utils.import_site_class( - __file__, "autotest_lib.server.site_autoserv_parser", + __file__, "autotest.server.site_autoserv_parser", "site_autoserv_parser", base_autoserv_parser) class autoserv_parser(site_autoserv_parser): diff --git a/server/autoserv_parser_unittest.py b/server/autoserv_parser_unittest.py index 6093e02bf8..fece5905c9 100755 --- a/server/autoserv_parser_unittest.py +++ b/server/autoserv_parser_unittest.py @@ -9,7 +9,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.server import autoserv_parser +from autotest.server import autoserv_parser class autoserv_parser_test(unittest.TestCase): diff --git a/server/autotest-remote b/server/autotest-remote index bb4abaa1cf..3dfc6428e5 100755 --- a/server/autotest-remote +++ b/server/autotest-remote @@ -10,7 +10,7 @@ try: import autotest.common as common except ImportError: import common -from autotest_lib.server import autoserv +from autotest.server import autoserv if __name__ == '__main__': diff --git a/server/autotest_remote.py b/server/autotest_remote.py index 6eb6df4127..4cc4707625 100644 --- a/server/autotest_remote.py +++ b/server/autotest_remote.py @@ -2,10 +2,10 @@ import re, os, sys, traceback, subprocess, time, pickle, glob, tempfile import logging, getpass -from autotest_lib.server import installable_object, prebuild, utils -from autotest_lib.client.common_lib import base_job, log, error, autotemp -from autotest_lib.client.common_lib import global_config, packages -from autotest_lib.client.common_lib import utils as client_utils +from autotest.server import installable_object, prebuild, utils +from autotest.client.common_lib import base_job, log, error, autotemp +from autotest.client.common_lib import global_config, packages +from autotest.client.common_lib import utils as client_utils get_value = global_config.global_config.get_config_value @@ -1033,12 +1033,12 @@ def close(self): SiteAutotest = client_utils.import_site_class( - __file__, "autotest_lib.server.site_autotest", "SiteAutotest", + __file__, "autotest.server.site_autotest", "SiteAutotest", BaseAutotest) _SiteRun = client_utils.import_site_class( - __file__, "autotest_lib.server.site_autotest", "_SiteRun", _BaseRun) + __file__, "autotest.server.site_autotest", "_SiteRun", _BaseRun) class Autotest(SiteAutotest): diff --git a/server/autotest_remote_unittest.py b/server/autotest_remote_unittest.py index ab50faaadc..759446402b 100755 --- a/server/autotest_remote_unittest.py +++ b/server/autotest_remote_unittest.py @@ -5,11 +5,11 @@ import unittest, os, tempfile, logging import common -from autotest_lib.server import autotest_remote, utils, hosts, server_job, profilers -from autotest_lib.client import sysinfo -from autotest_lib.client.common_lib import utils as client_utils, packages -from autotest_lib.client.common_lib import error -from autotest_lib.client.common_lib.test_utils import mock +from autotest.server import autotest_remote, utils, hosts, server_job, profilers +from autotest.client import sysinfo +from autotest.client.common_lib import utils as client_utils, packages +from autotest.client.common_lib import error +from autotest.client.common_lib.test_utils import mock class TestBaseAutotest(unittest.TestCase): diff --git a/server/base_utils.py b/server/base_utils.py index 1c58609a0f..fdcc33c57e 100644 --- a/server/base_utils.py +++ b/server/base_utils.py @@ -10,8 +10,8 @@ import atexit, os, re, shutil, textwrap, sys, tempfile, types -from autotest_lib.client.common_lib import barrier, utils -from autotest_lib.server import subcommand +from autotest.client.common_lib import barrier, utils +from autotest.server import subcommand # A dictionary of pid and a list of tmpdirs for that pid @@ -176,7 +176,7 @@ def unarchive(host, source_material): def get_server_dir(): - path = os.path.dirname(sys.modules['autotest_lib.server.utils'].__file__) + path = os.path.dirname(sys.modules['autotest.server.utils'].__file__) return os.path.abspath(path) diff --git a/server/base_utils_unittest.py b/server/base_utils_unittest.py index 91507e6ecd..d20438dada 100755 --- a/server/base_utils_unittest.py +++ b/server/base_utils_unittest.py @@ -7,7 +7,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.server import utils +from autotest.server import utils class UtilsTest(unittest.TestCase): diff --git a/server/common.py b/server/common.py index 0a5eb450af..228568bf49 100644 --- a/server/common.py +++ b/server/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/server/control_segments/crashdumps b/server/control_segments/crashdumps index b5ebe787bf..cf6743e55a 100644 --- a/server/control_segments/crashdumps +++ b/server/control_segments/crashdumps @@ -1,4 +1,4 @@ -from autotest_lib.server import crashcollect +from autotest.server import crashcollect def crashdumps(machine): diff --git a/server/control_segments/crashinfo b/server/control_segments/crashinfo index c802832574..8b7bd85b43 100644 --- a/server/control_segments/crashinfo +++ b/server/control_segments/crashinfo @@ -1,4 +1,4 @@ -from autotest_lib.server import crashcollect +from autotest.server import crashcollect def crashinfo(machine): diff --git a/server/control_segments/repair b/server/control_segments/repair index edef28b7f8..98a29f197c 100644 --- a/server/control_segments/repair +++ b/server/control_segments/repair @@ -1,4 +1,4 @@ -from autotest_lib.client.common_lib import host_protections +from autotest.client.common_lib import host_protections def _call_repair(machine): diff --git a/server/crashcollect.py b/server/crashcollect.py index 5b81a5e4f5..fcf2da1f91 100644 --- a/server/crashcollect.py +++ b/server/crashcollect.py @@ -1,15 +1,15 @@ import os, time, pickle, logging, shutil, gzip -from autotest_lib.client.common_lib import global_config -from autotest_lib.server import utils +from autotest.client.common_lib import global_config +from autotest.server import utils # import any site hooks for the crashdump and crashinfo collection get_site_crashdumps = utils.import_site_function( - __file__, "autotest_lib.server.site_crashcollect", "get_site_crashdumps", + __file__, "autotest.server.site_crashcollect", "get_site_crashdumps", lambda host, test_start_time: None) get_site_crashinfo = utils.import_site_function( - __file__, "autotest_lib.server.site_crashcollect", "get_site_crashinfo", + __file__, "autotest.server.site_crashcollect", "get_site_crashinfo", lambda host, test_start_time: None) diff --git a/server/deb_kernel.py b/server/deb_kernel.py index 2276b5c95e..fa5ec8404b 100644 --- a/server/deb_kernel.py +++ b/server/deb_kernel.py @@ -7,8 +7,8 @@ """ import os, os.path, time -from autotest_lib.client.common_lib import error -from autotest_lib.server import kernel, utils +from autotest.client.common_lib import error +from autotest.server import kernel, utils class DEBKernel(kernel.Kernel): diff --git a/server/deb_kernel_unittest.py b/server/deb_kernel_unittest.py index 87658c7351..e4e35551d2 100755 --- a/server/deb_kernel_unittest.py +++ b/server/deb_kernel_unittest.py @@ -5,10 +5,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib import utils as common_utils -from autotest_lib.server import deb_kernel, utils, hosts -from autotest_lib.server.hosts import bootloader +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib import utils as common_utils +from autotest.server import deb_kernel, utils, hosts +from autotest.server.hosts import bootloader class TestDebKernel(unittest.TestCase): diff --git a/server/frontend.py b/server/frontend.py index 750f998dc0..12915f4b87 100644 --- a/server/frontend.py +++ b/server/frontend.py @@ -19,13 +19,13 @@ import autotest.common as common except ImportError: import common -from autotest_lib.frontend.afe import rpc_client_lib -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib import utils +from autotest.frontend.afe import rpc_client_lib +from autotest.client.common_lib import global_config +from autotest.client.common_lib import utils try: - from autotest_lib.server.site_common import site_utils as server_utils + from autotest.server.site_common import site_utils as server_utils except: - from autotest_lib.server import utils as server_utils + from autotest.server import utils as server_utils form_ntuples_from_machines = server_utils.form_ntuples_from_machines GLOBAL_CONFIG = global_config.global_config diff --git a/server/frontend_unittest.py b/server/frontend_unittest.py index 9be14d5cb6..9c63aab4f9 100755 --- a/server/frontend_unittest.py +++ b/server/frontend_unittest.py @@ -11,11 +11,11 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib import utils -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.frontend.afe import rpc_client_lib -from autotest_lib.server import frontend +from autotest.client.common_lib import global_config +from autotest.client.common_lib import utils +from autotest.client.common_lib.test_utils import mock +from autotest.frontend.afe import rpc_client_lib +from autotest.server import frontend GLOBAL_CONFIG = global_config.global_config diff --git a/server/git_kernel.py b/server/git_kernel.py index b544a523c1..64c5e77e6a 100644 --- a/server/git_kernel.py +++ b/server/git_kernel.py @@ -4,7 +4,7 @@ import logging, os import source_kernel -from autotest_lib.client.common_lib import git +from autotest.client.common_lib import git class GitKernel(git.GitRepoHelper): diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py index cf72236cae..3de69f0bdc 100644 --- a/server/hosts/abstract_ssh.py +++ b/server/hosts/abstract_ssh.py @@ -1,8 +1,8 @@ import os, time, types, socket, shutil, glob, logging, traceback, tempfile -from autotest_lib.client.common_lib import autotemp, error, logging_manager -from autotest_lib.server import utils, autotest_remote -from autotest_lib.server.hosts import remote -from autotest_lib.client.common_lib.global_config import global_config +from autotest.client.common_lib import autotemp, error, logging_manager +from autotest.server import utils, autotest_remote +from autotest.server.hosts import remote +from autotest.client.common_lib.global_config import global_config get_value = global_config.get_config_value diff --git a/server/hosts/base_classes.py b/server/hosts/base_classes.py index 0759d5f543..00794f033b 100644 --- a/server/hosts/base_classes.py +++ b/server/hosts/base_classes.py @@ -19,9 +19,9 @@ import os -from autotest_lib.client.common_lib import hosts -from autotest_lib.server import utils -from autotest_lib.server.hosts import bootloader +from autotest.client.common_lib import hosts +from autotest.server import utils +from autotest.server.hosts import bootloader class Host(hosts.Host): diff --git a/server/hosts/base_classes_unittest.py b/server/hosts/base_classes_unittest.py index 0206779c47..55f4db263b 100755 --- a/server/hosts/base_classes_unittest.py +++ b/server/hosts/base_classes_unittest.py @@ -6,10 +6,10 @@ except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.server import utils -from autotest_lib.server.hosts import base_classes, bootloader +from autotest.client.common_lib import global_config +from autotest.client.common_lib.test_utils import mock +from autotest.server import utils +from autotest.server.hosts import base_classes, bootloader class test_host_class(unittest.TestCase): diff --git a/server/hosts/bootloader.py b/server/hosts/bootloader.py index a7f460ffc8..171f32b379 100644 --- a/server/hosts/bootloader.py +++ b/server/hosts/bootloader.py @@ -8,8 +8,8 @@ """ import os, sys, imp, weakref -from autotest_lib.client.common_lib import error -from autotest_lib.server import utils +from autotest.client.common_lib import error +from autotest.server import utils # # This performs some import magic, to import the boottool cli as a module diff --git a/server/hosts/bootloader_unittest.py b/server/hosts/bootloader_unittest.py index 1faed42bdb..8fde153282 100755 --- a/server/hosts/bootloader_unittest.py +++ b/server/hosts/bootloader_unittest.py @@ -6,10 +6,10 @@ except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib import error -from autotest_lib.server import utils, hosts -from autotest_lib.server.hosts import bootloader +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib import error +from autotest.server import utils, hosts +from autotest.server.hosts import bootloader class test_bootloader(unittest.TestCase): diff --git a/server/hosts/common.py b/server/hosts/common.py index 6767ca86f6..8c3561a24b 100644 --- a/server/hosts/common.py +++ b/server/hosts/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/server/hosts/factory.py b/server/hosts/factory.py index 6bd3f20d7f..22e89fd06a 100644 --- a/server/hosts/factory.py +++ b/server/hosts/factory.py @@ -1,7 +1,7 @@ -from autotest_lib.client.common_lib import utils, error, global_config -from autotest_lib.server import autotest_remote, utils as server_utils -from autotest_lib.server.hosts import site_factory, ssh_host, serial -from autotest_lib.server.hosts import logfile_monitor +from autotest.client.common_lib import utils, error, global_config +from autotest.server import autotest_remote, utils as server_utils +from autotest.server.hosts import site_factory, ssh_host, serial +from autotest.server.hosts import logfile_monitor DEFAULT_FOLLOW_PATH = '/var/log/kern.log' DEFAULT_PATTERNS_PATH = 'console_patterns' @@ -17,7 +17,7 @@ def create_host( netconsole=False, **args): # by default assume we're using SSH support if SSH_ENGINE == 'paramiko': - from autotest_lib.server.hosts import paramiko_host + from autotest.server.hosts import paramiko_host classes = [paramiko_host.ParamikoHost] elif SSH_ENGINE == 'raw_ssh': classes = [ssh_host.SSHHost, ssh_host.AsyncSSHMixin] diff --git a/server/hosts/guest.py b/server/hosts/guest.py index bd57e9dd4b..6e7f26e69d 100644 --- a/server/hosts/guest.py +++ b/server/hosts/guest.py @@ -17,7 +17,7 @@ """ -from autotest_lib.server.hosts import ssh_host +from autotest.server.hosts import ssh_host class Guest(ssh_host.SSHHost): diff --git a/server/hosts/install_server.py b/server/hosts/install_server.py index 5d96bb9eee..0df05d4e0f 100644 --- a/server/hosts/install_server.py +++ b/server/hosts/install_server.py @@ -2,7 +2,7 @@ Install server interfaces, for autotest client machine OS provisioning. """ import os, xmlrpclib, logging, time -from autotest_lib.client.common_lib import error +from autotest.client.common_lib import error def remove_hosts_file(): diff --git a/server/hosts/logfile_monitor.py b/server/hosts/logfile_monitor.py index e8164c61b3..b3aeb55e1c 100644 --- a/server/hosts/logfile_monitor.py +++ b/server/hosts/logfile_monitor.py @@ -1,9 +1,9 @@ import logging, os, sys, subprocess, tempfile, traceback import time, threading -from autotest_lib.client.common_lib import utils -from autotest_lib.server import utils as server_utils -from autotest_lib.server.hosts import abstract_ssh, monitors +from autotest.client.common_lib import utils +from autotest.server import utils as server_utils +from autotest.server.hosts import abstract_ssh, monitors MONITORDIR = monitors.__path__[0] SUPPORTED_PYTHON_VERS = ('2.4', '2.5', '2.6', '2.7') diff --git a/server/hosts/monitors/common.py b/server/hosts/monitors/common.py index dcb0182c27..e3c3da2be2 100644 --- a/server/hosts/monitors/common.py +++ b/server/hosts/monitors/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/server/hosts/monitors/console.py b/server/hosts/monitors/console.py index c516f9fb2b..a9bfd5034b 100755 --- a/server/hosts/monitors/console.py +++ b/server/hosts/monitors/console.py @@ -5,7 +5,7 @@ import gzip, optparse, os, signal, sys, time import common -from autotest_lib.server.hosts.monitors import monitors_util +from autotest.server.hosts.monitors import monitors_util PATTERNS_PATH = os.path.join(os.path.dirname(__file__), 'console_patterns') diff --git a/server/hosts/monitors/console_patterns_test.py b/server/hosts/monitors/console_patterns_test.py index 29524d8a25..5fe7aa5c42 100755 --- a/server/hosts/monitors/console_patterns_test.py +++ b/server/hosts/monitors/console_patterns_test.py @@ -5,7 +5,7 @@ except ImportError: import common import cStringIO, os, unittest -from autotest_lib.server.hosts.monitors import monitors_util +from autotest.server.hosts.monitors import monitors_util class _MockWarnFile(object): def __init__(self): diff --git a/server/hosts/monitors/console_unittest.py b/server/hosts/monitors/console_unittest.py index b079a68285..17dc643eaf 100755 --- a/server/hosts/monitors/console_unittest.py +++ b/server/hosts/monitors/console_unittest.py @@ -5,9 +5,9 @@ import os, shutil, signal, StringIO, tempfile import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.client.common_lib.test_utils import unittest -from autotest_lib.server.hosts.monitors import console +from autotest.client.common_lib.test_utils import mock +from autotest.client.common_lib.test_utils import unittest +from autotest.server.hosts.monitors import console class console_test(unittest.TestCase): def setUp(self): diff --git a/server/hosts/netconsole.py b/server/hosts/netconsole.py index f8e45b6bbc..231faf0403 100644 --- a/server/hosts/netconsole.py +++ b/server/hosts/netconsole.py @@ -1,7 +1,7 @@ import os, re, sys, subprocess, socket -from autotest_lib.client.common_lib import utils, error -from autotest_lib.server.hosts import remote +from autotest.client.common_lib import utils, error +from autotest.server.hosts import remote class NetconsoleHost(remote.RemoteHost): diff --git a/server/hosts/paramiko_host.py b/server/hosts/paramiko_host.py index d68b15e0d5..bb79b00a18 100644 --- a/server/hosts/paramiko_host.py +++ b/server/hosts/paramiko_host.py @@ -1,9 +1,9 @@ import os, sys, time, signal, socket, re, fnmatch, logging, threading import paramiko -from autotest_lib.client.common_lib import utils, error, global_config -from autotest_lib.server import subcommand -from autotest_lib.server.hosts import abstract_ssh +from autotest.client.common_lib import utils, error, global_config +from autotest.server import subcommand +from autotest.server.hosts import abstract_ssh class ParamikoHost(abstract_ssh.AbstractSSHHost): diff --git a/server/hosts/remote.py b/server/hosts/remote.py index a4f1fa4430..04ce2d2d3d 100644 --- a/server/hosts/remote.py +++ b/server/hosts/remote.py @@ -2,9 +2,9 @@ if it is available.""" import os, logging, urllib -from autotest_lib.client.common_lib import error, global_config -from autotest_lib.server import utils -from autotest_lib.server.hosts import base_classes, install_server +from autotest.client.common_lib import error, global_config +from autotest.server import utils +from autotest.server.hosts import base_classes, install_server def get_install_server_info(): diff --git a/server/hosts/remote_unittest.py b/server/hosts/remote_unittest.py index 2d25d59172..886f60ca1a 100755 --- a/server/hosts/remote_unittest.py +++ b/server/hosts/remote_unittest.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.server.hosts import remote +from autotest.server.hosts import remote class test_remote_host(unittest.TestCase): diff --git a/server/hosts/serial.py b/server/hosts/serial.py index d363cb7337..201acaaded 100644 --- a/server/hosts/serial.py +++ b/server/hosts/serial.py @@ -1,12 +1,12 @@ import os, sys, subprocess, logging -from autotest_lib.client.common_lib import utils, error -from autotest_lib.server import utils as server_utils -from autotest_lib.server.hosts import remote +from autotest.client.common_lib import utils, error +from autotest.server import utils as server_utils +from autotest.server.hosts import remote SiteHost = utils.import_site_class( - __file__, "autotest_lib.server.hosts.site_host", "SiteHost", + __file__, "autotest.server.hosts.site_host", "SiteHost", remote.RemoteHost) diff --git a/server/hosts/ssh_host.py b/server/hosts/ssh_host.py index 0de96b5e84..8897e6ac81 100644 --- a/server/hosts/ssh_host.py +++ b/server/hosts/ssh_host.py @@ -11,9 +11,9 @@ """ import sys, re, traceback, logging, subprocess, os -from autotest_lib.client.common_lib import error, pxssh -from autotest_lib.server import utils -from autotest_lib.server.hosts import abstract_ssh +from autotest.client.common_lib import error, pxssh +from autotest.server import utils +from autotest.server.hosts import abstract_ssh class SSHHost(abstract_ssh.AbstractSSHHost): diff --git a/server/installable_object.py b/server/installable_object.py index bfb8a472c7..4d8b7255fd 100644 --- a/server/installable_object.py +++ b/server/installable_object.py @@ -1,4 +1,4 @@ -from autotest_lib.server import utils +from autotest.server import utils class InstallableObject(object): diff --git a/server/kernel.py b/server/kernel.py index 8329caa2dc..5eb0573e9a 100644 --- a/server/kernel.py +++ b/server/kernel.py @@ -7,7 +7,7 @@ """ -from autotest_lib.server import installable_object +from autotest.server import installable_object class Kernel(installable_object.InstallableObject): diff --git a/server/kvm.py b/server/kvm.py index eddf7672ab..a87687a99d 100644 --- a/server/kvm.py +++ b/server/kvm.py @@ -15,8 +15,8 @@ import os -from autotest_lib.client.common_lib import error -from autotest_lib.server import hypervisor, utils, hosts +from autotest.client.common_lib import error +from autotest.server import hypervisor, utils, hosts _qemu_ifup_script= """\ diff --git a/server/prebuild.py b/server/prebuild.py index a426f74809..0594d55721 100644 --- a/server/prebuild.py +++ b/server/prebuild.py @@ -7,7 +7,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client import setup_job as client_setup_job +from autotest.client import setup_job as client_setup_job def touch_init(parent_dir, child_dir): diff --git a/server/profiler.py b/server/profiler.py index c8871e0170..062e96baa8 100644 --- a/server/profiler.py +++ b/server/profiler.py @@ -47,7 +47,7 @@ def __init__(self, profiler_name): # does the profiler support rebooting? profiler_module = common.setup_modules.import_module( - profiler_name, "autotest_lib.client.profilers.%s" % profiler_name) + profiler_name, "autotest.client.profilers.%s" % profiler_name) profiler_class = getattr(profiler_module, profiler_name) self.supports_reboot = profiler_class.supports_reboot diff --git a/server/profilers.py b/server/profilers.py index d661316dd1..12cf01f97e 100644 --- a/server/profilers.py +++ b/server/profilers.py @@ -4,9 +4,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils, error, profiler_manager -from autotest_lib.server import profiler, autotest_remote, standalone_profiler -from autotest_lib.server import hosts +from autotest.client.common_lib import utils, error, profiler_manager +from autotest.server import profiler, autotest_remote, standalone_profiler +from autotest.server import hosts PROFILER_TMPDIR = '/tmp/profilers' diff --git a/server/rpm_kernel.py b/server/rpm_kernel.py index b0ab028ef3..901aac45b0 100644 --- a/server/rpm_kernel.py +++ b/server/rpm_kernel.py @@ -14,8 +14,8 @@ import os, time -from autotest_lib.client.common_lib import error -from autotest_lib.server import kernel, utils +from autotest.client.common_lib import error +from autotest.server import kernel, utils class RPMKernel(kernel.Kernel): diff --git a/server/rpm_kernel_unittest.py b/server/rpm_kernel_unittest.py index eb002fcf75..0e85a25292 100755 --- a/server/rpm_kernel_unittest.py +++ b/server/rpm_kernel_unittest.py @@ -5,10 +5,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils as common_utils -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.server import rpm_kernel, utils, hosts -from autotest_lib.server.hosts import bootloader +from autotest.client.common_lib import utils as common_utils +from autotest.client.common_lib.test_utils import mock +from autotest.server import rpm_kernel, utils, hosts +from autotest.server.hosts import bootloader class TestRpmKernel(unittest.TestCase): diff --git a/server/samples/parallel_sleeptest.srv b/server/samples/parallel_sleeptest.srv index bcb27cb3c0..c44b64cb28 100644 --- a/server/samples/parallel_sleeptest.srv +++ b/server/samples/parallel_sleeptest.srv @@ -17,7 +17,7 @@ To run a different set of tests do the following: server/autoserv -m -r """ -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils # Specify the path to the client control files and the tag names # for the respective jobs here. diff --git a/server/self-test/autotest_test.py b/server/self-test/autotest_test.py index 4435169b97..3c795f412d 100755 --- a/server/self-test/autotest_test.py +++ b/server/self-test/autotest_test.py @@ -14,10 +14,10 @@ import common -from autotest_lib.server import utils -from autotest_lib.server import autotest_remote -from autotest_lib.server import hosts -from autotest_lib.client.common_lib import global_config +from autotest.server import utils +from autotest.server import autotest_remote +from autotest.server import hosts +from autotest.client.common_lib import global_config _GLOBAL_CONFIG = global_config.global_config diff --git a/server/self-test/common.py b/server/self-test/common.py index 41607e1724..cdf0f6adf4 100644 --- a/server/self-test/common.py +++ b/server/self-test/common.py @@ -5,4 +5,4 @@ sys.path.insert(0, client_dir) import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/server/self-test/utils_test.py b/server/self-test/utils_test.py index e1b2de30db..4196a6fee3 100755 --- a/server/self-test/utils_test.py +++ b/server/self-test/utils_test.py @@ -14,7 +14,7 @@ import common -from autotest_lib.server import utils +from autotest.server import utils class UtilsTestCase(unittest.TestCase): diff --git a/server/server_job.py b/server/server_job.py index 9fa3d4bb09..6cbc8995c1 100644 --- a/server/server_job.py +++ b/server/server_job.py @@ -8,13 +8,13 @@ import getpass, os, sys, re, stat, tempfile, time, select, subprocess, platform import traceback, shutil, warnings, fcntl, pickle, logging, itertools, errno -from autotest_lib.client import sysinfo -from autotest_lib.client.common_lib import base_job -from autotest_lib.client.common_lib import error, log, utils, packages -from autotest_lib.client.common_lib import logging_manager -from autotest_lib.server import test, subcommand, profilers -from autotest_lib.server.hosts import abstract_ssh -from autotest_lib.tko import db as tko_db, status_lib, utils as tko_utils +from autotest.client import sysinfo +from autotest.client.common_lib import base_job +from autotest.client.common_lib import error, log, utils, packages +from autotest.client.common_lib import logging_manager +from autotest.server import test, subcommand, profilers +from autotest.server.hosts import abstract_ssh +from autotest.tko import db as tko_db, status_lib, utils as tko_utils def _control_segment_path(name): @@ -963,15 +963,15 @@ def _import_names(module_name, names=()): # This is the equivalent of prepending a bunch of import statements to # the front of the control script. namespace.update(os=os, sys=sys, logging=logging) - _import_names('autotest_lib.server', + _import_names('autotest.server', ('hosts', 'autotest_remote', 'kvm', 'standalone_profiler', 'source_kernel', 'rpm_kernel', 'deb_kernel', 'git_kernel')) - _import_names('autotest_lib.server.subcommand', + _import_names('autotest.server.subcommand', ('parallel', 'parallel_simple', 'subcommand')) - _import_names('autotest_lib.server.utils', + _import_names('autotest.server.utils', ('run', 'get_tmp_dir', 'sh_escape', 'parse_machine')) - _import_names('autotest_lib.client.common_lib.error') - _import_names('autotest_lib.client.common_lib.barrier', ('barrier',)) + _import_names('autotest.client.common_lib.error') + _import_names('autotest.client.common_lib.barrier', ('barrier',)) # Inject ourself as the job object into other classes within the API. # (Yuck, this injection is a gross thing be part of a public API. -gps) @@ -1137,12 +1137,12 @@ def enable_warnings(self, warning_type, current_time_func=time.time): # load up site-specific code for generating site-specific job data get_site_job_data = utils.import_site_function(__file__, - "autotest_lib.server.site_server_job", "get_site_job_data", + "autotest.server.site_server_job", "get_site_job_data", _get_site_job_data_dummy) site_server_job = utils.import_site_class( - __file__, "autotest_lib.server.site_server_job", "site_server_job", + __file__, "autotest.server.site_server_job", "site_server_job", base_server_job) diff --git a/server/server_job_unittest.py b/server/server_job_unittest.py index f5f3ad8d72..fa1da17e97 100755 --- a/server/server_job_unittest.py +++ b/server/server_job_unittest.py @@ -6,9 +6,9 @@ except ImportError: import common -from autotest_lib.server import server_job -from autotest_lib.client.common_lib import base_job_unittest -from autotest_lib.client.common_lib.test_utils import mock, unittest +from autotest.server import server_job +from autotest.client.common_lib import base_job_unittest +from autotest.client.common_lib.test_utils import mock, unittest class test_find_base_directories( diff --git a/server/server_logging_config.py b/server/server_logging_config.py index 4875baa94e..75393f502b 100644 --- a/server/server_logging_config.py +++ b/server/server_logging_config.py @@ -3,7 +3,7 @@ except ImportError: import common import logging, os -from autotest_lib.client.common_lib import logging_config +from autotest.client.common_lib import logging_config class ServerLoggingConfig(logging_config.LoggingConfig): def add_debug_file_handlers(self, log_dir, log_name=None): diff --git a/server/setup.py b/server/setup.py index bd5d958d51..696fa0d136 100644 --- a/server/setup.py +++ b/server/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up server_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/server/site_autoserv_parser.py b/server/site_autoserv_parser.py index 3f2d01d6ff..4423605eea 100644 --- a/server/site_autoserv_parser.py +++ b/server/site_autoserv_parser.py @@ -4,7 +4,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.server.autoserv_parser import base_autoserv_parser +from autotest.server.autoserv_parser import base_autoserv_parser add_usage = """\ diff --git a/server/source_kernel.py b/server/source_kernel.py index 5db046386d..c8ca6cdbeb 100644 --- a/server/source_kernel.py +++ b/server/source_kernel.py @@ -7,7 +7,7 @@ """ -from autotest_lib.server import kernel, autotest_remote +from autotest.server import kernel, autotest_remote class SourceKernel(kernel.Kernel): diff --git a/server/source_kernel_unittest.py b/server/source_kernel_unittest.py index 77324fb8b6..b44dcb428a 100755 --- a/server/source_kernel_unittest.py +++ b/server/source_kernel_unittest.py @@ -5,8 +5,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.server import source_kernel, autotest_remote, hosts +from autotest.client.common_lib.test_utils import mock +from autotest.server import source_kernel, autotest_remote, hosts class TestSourceKernel(unittest.TestCase): diff --git a/server/standalone_profiler.py b/server/standalone_profiler.py index 880928300d..6b8188110a 100644 --- a/server/standalone_profiler.py +++ b/server/standalone_profiler.py @@ -14,7 +14,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import barrier +from autotest.client.common_lib import barrier # Client control file snippet used to synchronize profiler start & stop. _RUNTEST_PATTERN = ("job.run_test('profiler_sync', timeout_sync=%r,\n" diff --git a/server/subcommand.py b/server/subcommand.py index 8aa2d96aff..2d10995278 100644 --- a/server/subcommand.py +++ b/server/subcommand.py @@ -2,7 +2,7 @@ import sys, os, subprocess, time, signal, cPickle, logging -from autotest_lib.client.common_lib import error, utils +from autotest.client.common_lib import error, utils # entry points that use subcommand must set this to their logging manager diff --git a/server/subcommand_unittest.py b/server/subcommand_unittest.py index 7d42442bf0..fd4812c0f0 100755 --- a/server/subcommand_unittest.py +++ b/server/subcommand_unittest.py @@ -7,8 +7,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.server import subcommand +from autotest.client.common_lib.test_utils import mock +from autotest.server import subcommand def _create_subcommand(func, args): diff --git a/server/test.py b/server/test.py index 927a33a108..19794085ce 100644 --- a/server/test.py +++ b/server/test.py @@ -5,7 +5,7 @@ import os, tempfile, logging -from autotest_lib.client.common_lib import log, utils, test as common_test +from autotest.client.common_lib import log, utils, test as common_test class test(common_test.base_test): @@ -15,7 +15,7 @@ class test(common_test.base_test): _sysinfo_before_test_script = """\ import pickle -from autotest_lib.client import test +from autotest.client import test mytest = test.test(job, '', %r) job.sysinfo.log_before_each_test(mytest) sysinfo_pickle = os.path.join(mytest.outputdir, 'sysinfo.pickle') @@ -25,7 +25,7 @@ class test(common_test.base_test): _sysinfo_after_test_script = """\ import pickle -from autotest_lib.client import test +from autotest.client import test mytest = test.test(job, '', %r) sysinfo_pickle = os.path.join(mytest.outputdir, 'sysinfo.pickle') if os.path.exists(sysinfo_pickle): @@ -41,7 +41,7 @@ class test(common_test.base_test): # _sysinfo_after_test_script to pick it up later _sysinfo_iteration_script = """\ import pickle -from autotest_lib.client import test +from autotest.client import test mytest = test.test(job, '', %r) sysinfo_pickle = os.path.join(mytest.outputdir, 'sysinfo.pickle') if os.path.exists(sysinfo_pickle): @@ -86,7 +86,7 @@ def __init__(self, job): def _install(self): if not self.host: - from autotest_lib.server import hosts, autotest_remote + from autotest.server import hosts, autotest_remote self.host = hosts.create_host(self.job.machines[0], auto_monitor=False) try: diff --git a/server/tests/barriertest_2client/control.srv b/server/tests/barriertest_2client/control.srv index 1cb2ebb187..6c00a6ed1f 100644 --- a/server/tests/barriertest_2client/control.srv +++ b/server/tests/barriertest_2client/control.srv @@ -11,7 +11,7 @@ A functional test of autotest's Barrier mechanisms for synchronizing events between two clients without the help of the server. """ -from autotest_lib.server import utils +from autotest.server import utils def run(pair): logging.info('Running on %s and %s', pair[0], pair[1]) diff --git a/server/tests/cleanup_test/cleanup_test.py b/server/tests/cleanup_test/cleanup_test.py index f79781791e..08d17cfc02 100644 --- a/server/tests/cleanup_test/cleanup_test.py +++ b/server/tests/cleanup_test/cleanup_test.py @@ -1,5 +1,5 @@ -from autotest_lib.server import test -from autotest_lib.client.common_lib import error +from autotest.server import test +from autotest.client.common_lib import error class cleanup_test(test.test): version = 1 diff --git a/server/tests/iperf/control.srv b/server/tests/iperf/control.srv index 17b3f3e9aa..a592f58920 100644 --- a/server/tests/iperf/control.srv +++ b/server/tests/iperf/control.srv @@ -25,7 +25,7 @@ stream_list - A list containing the number of streams to run the test for. If bidirectional streams. """ -from autotest_lib.server import utils +from autotest.server import utils def run(pair): diff --git a/server/tests/iperf/control.stress.srv b/server/tests/iperf/control.stress.srv index fd8f8886b9..3ad6fa6b28 100644 --- a/server/tests/iperf/control.stress.srv +++ b/server/tests/iperf/control.stress.srv @@ -25,7 +25,7 @@ stream_list - A list containing the number of streams to run the test for. If bidirectional streams. """ -from autotest_lib.server import utils +from autotest.server import utils def run(pair): diff --git a/server/tests/iperf/iperf.py b/server/tests/iperf/iperf.py index 0c3e970914..079fc0d1f9 100644 --- a/server/tests/iperf/iperf.py +++ b/server/tests/iperf/iperf.py @@ -1,5 +1,5 @@ -from autotest_lib.server import autotest_remote, hosts, subcommand, test -from autotest_lib.server import utils +from autotest.server import autotest_remote, hosts, subcommand, test +from autotest.server import utils class iperf(test.test): version = 1 diff --git a/server/tests/netperf2/control.srv b/server/tests/netperf2/control.srv index 9969679d19..eb8346cd49 100644 --- a/server/tests/netperf2/control.srv +++ b/server/tests/netperf2/control.srv @@ -22,7 +22,7 @@ stream_list - A list containing the number of streams to run the test for. If cycles - The number of times to run each test. """ -from autotest_lib.server import utils +from autotest.server import utils def run(pair): diff --git a/server/tests/netperf2/control.stress.srv b/server/tests/netperf2/control.stress.srv index 33961cf175..907af78cac 100644 --- a/server/tests/netperf2/control.stress.srv +++ b/server/tests/netperf2/control.stress.srv @@ -24,7 +24,7 @@ stream_list - A list containing the number of streams to run the test for. If bidirectional streams. """ -from autotest_lib.server import utils +from autotest.server import utils def run(pair): diff --git a/server/tests/netperf2/netperf2.py b/server/tests/netperf2/netperf2.py index eba1a63304..cbccdd1157 100644 --- a/server/tests/netperf2/netperf2.py +++ b/server/tests/netperf2/netperf2.py @@ -1,5 +1,5 @@ -from autotest_lib.server import autotest_remote, hosts, subcommand, test -from autotest_lib.server import utils +from autotest.server import autotest_remote, hosts, subcommand, test +from autotest.server import utils class netperf2(test.test): version = 2 diff --git a/server/tests/netpipe/control.srv b/server/tests/netpipe/control.srv index a10878e40e..b9fd678127 100644 --- a/server/tests/netpipe/control.srv +++ b/server/tests/netpipe/control.srv @@ -25,7 +25,7 @@ variance - NetPIPE chooses the message sizes at regular intervals, perturbation_size to 0. (from man NPtcp) """ -from autotest_lib.server import utils +from autotest.server import utils buffer_size = 1048576 upper_bound = 1048576 diff --git a/server/tests/netpipe/control.stress.srv b/server/tests/netpipe/control.stress.srv index c76fed8a53..457f39fe1c 100644 --- a/server/tests/netpipe/control.stress.srv +++ b/server/tests/netpipe/control.stress.srv @@ -29,7 +29,7 @@ cycles - Number of times to repeat each test. Each cycle takes about 6 minutes to complete. """ -from autotest_lib.server import utils +from autotest.server import utils # Buffer sizes should not be less than 131072, as this will cause netpipe # to hang. diff --git a/server/tests/netpipe/netpipe.py b/server/tests/netpipe/netpipe.py index 2e905a9dec..e941deaaf5 100644 --- a/server/tests/netpipe/netpipe.py +++ b/server/tests/netpipe/netpipe.py @@ -1,5 +1,5 @@ -from autotest_lib.server import autotest_remote, hosts, subcommand, test -from autotest_lib.server import utils +from autotest.server import autotest_remote, hosts, subcommand, test +from autotest.server import utils class netpipe(test.test): version = 2 diff --git a/server/tests/reinstall/control b/server/tests/reinstall/control index 9b6c646caa..9b6134f12d 100644 --- a/server/tests/reinstall/control +++ b/server/tests/reinstall/control @@ -7,7 +7,7 @@ TEST_TYPE = "server" RUN_VERIFY = False DOC = """\ This will re-install a machine, using the code in -autotest_lib.server.hosts.Host.machine_install().""" +autotest.server.hosts.Host.machine_install().""" def run(machine): host = hosts.create_host(machine, initialize=False) diff --git a/server/tests/reinstall/reinstall.py b/server/tests/reinstall/reinstall.py index 1060ab4c89..f7fe914d97 100644 --- a/server/tests/reinstall/reinstall.py +++ b/server/tests/reinstall/reinstall.py @@ -1,6 +1,6 @@ import time -from autotest_lib.server import test -from autotest_lib.client.common_lib import error +from autotest.server import test +from autotest.client.common_lib import error class reinstall(test.test): version = 1 diff --git a/server/tests/sleeptest/sleeptest.py b/server/tests/sleeptest/sleeptest.py index 99b360169b..410943930e 100644 --- a/server/tests/sleeptest/sleeptest.py +++ b/server/tests/sleeptest/sleeptest.py @@ -1,5 +1,5 @@ import time -from autotest_lib.server import test +from autotest.server import test class sleeptest(test.test): version = 1 diff --git a/server/tests/verify_test/verify_test.py b/server/tests/verify_test/verify_test.py index 693df122d4..922e63eb55 100644 --- a/server/tests/verify_test/verify_test.py +++ b/server/tests/verify_test/verify_test.py @@ -1,5 +1,5 @@ -from autotest_lib.server import test -from autotest_lib.client.common_lib import error +from autotest.server import test +from autotest.client.common_lib import error class verify_test(test.test): version = 1 diff --git a/server/utils.py b/server/utils.py index 72f72f938f..5124880b96 100644 --- a/server/utils.py +++ b/server/utils.py @@ -8,7 +8,7 @@ inheritance with, just a collection of static methods. """ -from autotest_lib.client.common_lib.utils import * -from autotest_lib.server.base_utils import * +from autotest.client.common_lib.utils import * +from autotest.server.base_utils import * if os.path.exists(os.path.join(os.path.dirname(__file__), 'site_utils.py')): - from autotest_lib.server.site_utils import * + from autotest.server.site_utils import * diff --git a/tko/autotest-db-delete-job b/tko/autotest-db-delete-job index a929facfc5..42da1a2332 100755 --- a/tko/autotest-db-delete-job +++ b/tko/autotest-db-delete-job @@ -4,10 +4,10 @@ try: import autotest.common as common except ImportError: import common -from autotest_lib.tko import db -from autotest_lib.client.common_lib import global_config -from autotest_lib.client.common_lib import logging_manager, logging_config -from autotest_lib.client import utils +from autotest.tko import db +from autotest.client.common_lib import global_config +from autotest.client.common_lib import logging_manager, logging_config +from autotest.client import utils GLOBAL_CONFIG = global_config.global_config ERROR_NO_RESULTS_AVAILABLE = 1 diff --git a/tko/common.py b/tko/common.py index 0a5eb450af..228568bf49 100644 --- a/tko/common.py +++ b/tko/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/tko/compose_query.cgi b/tko/compose_query.cgi index 9d8548e744..ead0dd2ba5 100755 --- a/tko/compose_query.cgi +++ b/tko/compose_query.cgi @@ -16,8 +16,8 @@ try: import autotest.common except ImportError: import common -from autotest_lib.tko import display, frontend, db, query_lib -from autotest_lib.client.common_lib import kernel_versions +from autotest.tko import display, frontend, db, query_lib +from autotest.client.common_lib import kernel_versions html_header = """\
diff --git a/tko/db.py b/tko/db.py index 3f2a8f3043..f5091f1659 100644 --- a/tko/db.py +++ b/tko/db.py @@ -4,8 +4,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.tko import utils +from autotest.client.common_lib import global_config +from autotest.tko import utils class MySQLTooManyRows(Exception): @@ -544,7 +544,7 @@ def _get_db_type(): def _get_error_class(class_name): """Retrieves the appropriate error class by name from the database module.""" - db_module = __import__("autotest_lib.tko." + _get_db_type(), + db_module = __import__("autotest.tko." + _get_db_type(), globals(), locals(), ["driver"]) return getattr(db_module.driver, class_name) @@ -554,7 +554,7 @@ def db(*args, **dargs): provided in args and dargs, using the database type specified by the global configuration (defaulting to mysql).""" db_type = _get_db_type() - db_module = __import__("autotest_lib.tko." + db_type, globals(), + db_module = __import__("autotest.tko." + db_type, globals(), locals(), [db_type]) db = getattr(db_module, db_type)(*args, **dargs) return db diff --git a/tko/frontend.py b/tko/frontend.py index b69d21a076..0c863c24d3 100644 --- a/tko/frontend.py +++ b/tko/frontend.py @@ -3,7 +3,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import kernel_versions +from autotest.client.common_lib import kernel_versions MAX_RECORDS = 50000L MAX_CELLS = 500000L diff --git a/tko/job_serializer.py b/tko/job_serializer.py index f950206863..54bad42323 100755 --- a/tko/job_serializer.py +++ b/tko/job_serializer.py @@ -17,9 +17,9 @@ import re # import autotest libraries -from autotest_lib.tko import models -from autotest_lib.tko import tko_pb2 -from autotest_lib.tko import utils +from autotest.tko import models +from autotest.tko import tko_pb2 +from autotest.tko import utils __author__ = 'darrenkuo@google.com (Darren Kuo)' diff --git a/tko/job_serializer_unittest.py b/tko/job_serializer_unittest.py index 1ed32c76d7..f361304a71 100755 --- a/tko/job_serializer_unittest.py +++ b/tko/job_serializer_unittest.py @@ -16,10 +16,10 @@ import tempfile import time -from autotest_lib.tko import tko_pb2 -from autotest_lib.tko import job_serializer -from autotest_lib.tko import models -from autotest_lib.client.common_lib.test_utils import unittest +from autotest.tko import tko_pb2 +from autotest.tko import job_serializer +from autotest.tko import models +from autotest.client.common_lib.test_utils import unittest NamedTemporaryFile = tempfile.NamedTemporaryFile datetime = datetime.datetime diff --git a/tko/jsonp_fetcher.cgi b/tko/jsonp_fetcher.cgi index b6c0393a8d..3e72507b52 100755 --- a/tko/jsonp_fetcher.cgi +++ b/tko/jsonp_fetcher.cgi @@ -5,7 +5,7 @@ try: import autotest.common except ImportError: import common -from autotest_lib.frontend.afe.json_rpc import serviceHandler +from autotest.frontend.afe.json_rpc import serviceHandler script = """\ Content-Type: text/javascript diff --git a/tko/machine_aggr.cgi b/tko/machine_aggr.cgi index a9dd91024b..d855dccbbc 100755 --- a/tko/machine_aggr.cgi +++ b/tko/machine_aggr.cgi @@ -10,8 +10,8 @@ try: import autotest.common except ImportError: import common -from autotest_lib.tko import db, display, frontend, plotgraph -from autotest_lib.client.common_lib import kernel_versions +from autotest.tko import db, display, frontend, plotgraph +from autotest.client.common_lib import kernel_versions released_kernel = re.compile('2\.\d\.\d+(-smp-)[0-9]{3}\.[0-9]$') rc_kernel = re.compile('2\.\d\.\d+(-smp-)[0-9]{3}\.[0-9]_rc[0-9]$') diff --git a/tko/machine_benchmark.cgi b/tko/machine_benchmark.cgi index ed0af1567d..8111648876 100755 --- a/tko/machine_benchmark.cgi +++ b/tko/machine_benchmark.cgi @@ -8,7 +8,7 @@ try: import autotest.common except ImportError: import common -from autotest_lib.tko import db, display, frontend +from autotest.tko import db, display, frontend db = db.db() diff --git a/tko/machine_test_attribute_graph.cgi b/tko/machine_test_attribute_graph.cgi index fc445dab35..e4cdb5f8ef 100755 --- a/tko/machine_test_attribute_graph.cgi +++ b/tko/machine_test_attribute_graph.cgi @@ -10,8 +10,8 @@ try: import autotest.common except ImportError: import common -from autotest_lib.tko import db, display, frontend, plotgraph -from autotest_lib.client.common_lib import kernel_versions +from autotest.tko import db, display, frontend, plotgraph +from autotest.client.common_lib import kernel_versions db = db.db() diff --git a/tko/migrations/031_rename_tko_tables.py b/tko/migrations/031_rename_tko_tables.py index 79c4c03c06..a2cf5af379 100644 --- a/tko/migrations/031_rename_tko_tables.py +++ b/tko/migrations/031_rename_tko_tables.py @@ -2,7 +2,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.database import db_utils +from autotest.database import db_utils RECREATE_VIEWS_UP = """ diff --git a/tko/migrations/common.py b/tko/migrations/common.py index 3b244b4d1f..7e5a872e2b 100644 --- a/tko/migrations/common.py +++ b/tko/migrations/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/tko/models.py b/tko/models.py index 8f0604984c..b18583ac66 100644 --- a/tko/models.py +++ b/tko/models.py @@ -1,7 +1,7 @@ import os -from autotest_lib.client.common_lib import utils -from autotest_lib.tko import utils as tko_utils +from autotest.client.common_lib import utils +from autotest.tko import utils as tko_utils class job(object): diff --git a/tko/nightly.py b/tko/nightly.py index f64524eaea..930b48c716 100644 --- a/tko/nightly.py +++ b/tko/nightly.py @@ -6,8 +6,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.tko import db, plotgraph, perf -from autotest_lib.client.common_lib import kernel_versions +from autotest.tko import db, plotgraph, perf +from autotest.client.common_lib import kernel_versions def add_kernel_jobs(label_pattern): diff --git a/tko/parse b/tko/parse index 69f1788a65..a0542e2b14 100755 --- a/tko/parse +++ b/tko/parse @@ -4,5 +4,5 @@ try: import autotest.common except ImportError: import common -from autotest_lib.tko import parse +from autotest.tko import parse parse.main() diff --git a/tko/parse.py b/tko/parse.py index b454f55160..608f19e45f 100755 --- a/tko/parse.py +++ b/tko/parse.py @@ -6,9 +6,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import mail, pidfile -from autotest_lib.tko import db as tko_db, utils as tko_utils, status_lib, models -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import mail, pidfile +from autotest.tko import db as tko_db, utils as tko_utils, status_lib, models +from autotest.client.common_lib import utils def parse_args(): @@ -163,15 +163,15 @@ def parse_one(db, jobname, path, reparse, mail_on_failure): # Serializing job into a binary file try: - from autotest_lib.tko import tko_pb2 - from autotest_lib.tko import job_serializer + from autotest.tko import tko_pb2 + from autotest.tko import job_serializer serializer = job_serializer.JobSerializer() binary_file_name = os.path.join(path, "job.serialize") serializer.serialize_to_binary(job, jobname, binary_file_name) if reparse: - site_export_file = "autotest_lib.tko.site_export" + site_export_file = "autotest.tko.site_export" site_export = utils.import_site_function(__file__, site_export_file, "site_export", diff --git a/tko/parsers/base.py b/tko/parsers/base.py index eb57643718..5063c039a0 100644 --- a/tko/parsers/base.py +++ b/tko/parsers/base.py @@ -1,6 +1,6 @@ import traceback -from autotest_lib.tko import status_lib, utils as tko_utils +from autotest.tko import status_lib, utils as tko_utils class parser(object): diff --git a/tko/parsers/common.py b/tko/parsers/common.py index 6767ca86f6..8c3561a24b 100644 --- a/tko/parsers/common.py +++ b/tko/parsers/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/tko/parsers/test/common.py b/tko/parsers/test/common.py index dcb0182c27..e3c3da2be2 100644 --- a/tko/parsers/test/common.py +++ b/tko/parsers/test/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/tko/parsers/test/execute_parser.py b/tko/parsers/test/execute_parser.py index 51eda4b02f..b2f6bcf8b0 100755 --- a/tko/parsers/test/execute_parser.py +++ b/tko/parsers/test/execute_parser.py @@ -8,7 +8,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.tko.parsers.test import scenario_base +from autotest.tko.parsers.test import scenario_base usage = 'usage: %prog [options] scenario_dirpath parser_result_tag' parser = optparse.OptionParser(usage=usage) diff --git a/tko/parsers/test/inspect_parser_result_store.py b/tko/parsers/test/inspect_parser_result_store.py index e5c13ac716..963a5f17fb 100755 --- a/tko/parsers/test/inspect_parser_result_store.py +++ b/tko/parsers/test/inspect_parser_result_store.py @@ -11,7 +11,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.tko.parsers.test import scenario_base +from autotest.tko.parsers.test import scenario_base usage = 'usage: %prog [options] scenario_dirpath' diff --git a/tko/parsers/test/new_scenario.py b/tko/parsers/test/new_scenario.py index bf939a2735..c8b5d79196 100755 --- a/tko/parsers/test/new_scenario.py +++ b/tko/parsers/test/new_scenario.py @@ -24,8 +24,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.tko.parsers.test import scenario_base -from autotest_lib.client.common_lib import autotemp +from autotest.tko.parsers.test import scenario_base +from autotest.client.common_lib import autotemp usage = 'usage: %prog [options] results_dirpath scenerios_dirpath' parser = optparse.OptionParser(usage=usage) diff --git a/tko/parsers/test/scenario_base.py b/tko/parsers/test/scenario_base.py index ceb6e4c6eb..af736003f2 100644 --- a/tko/parsers/test/scenario_base.py +++ b/tko/parsers/test/scenario_base.py @@ -8,10 +8,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils, autotemp -from autotest_lib.tko import status_lib -from autotest_lib.tko.parsers.test import templates -from autotest_lib.tko.parsers.test import unittest_hotfix +from autotest.client.common_lib import utils, autotemp +from autotest.tko import status_lib +from autotest.tko.parsers.test import templates +from autotest.tko.parsers.test import unittest_hotfix TEMPLATES_DIRPATH = templates.__path__[0] # Set TZ used to UTC diff --git a/tko/parsers/test/templates/base.py b/tko/parsers/test/templates/base.py index e8afb1a219..ab506d83e9 100755 --- a/tko/parsers/test/templates/base.py +++ b/tko/parsers/test/templates/base.py @@ -10,7 +10,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.tko.parsers.test import scenario_base +from autotest.tko.parsers.test import scenario_base GOLDEN = 'golden' diff --git a/tko/parsers/test/templates/scenario_package_common.py b/tko/parsers/test/templates/scenario_package_common.py index 90f3161b04..de92fc9148 100644 --- a/tko/parsers/test/templates/scenario_package_common.py +++ b/tko/parsers/test/templates/scenario_package_common.py @@ -12,4 +12,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/tko/parsers/version_0.py b/tko/parsers/version_0.py index 45ca44d2da..65edaaa6a4 100644 --- a/tko/parsers/version_0.py +++ b/tko/parsers/version_0.py @@ -1,8 +1,8 @@ import re, os -from autotest_lib.client.common_lib import utils as common_utils -from autotest_lib.tko import utils as tko_utils, models, status_lib -from autotest_lib.tko.parsers import base +from autotest.client.common_lib import utils as common_utils +from autotest.tko import utils as tko_utils, models, status_lib +from autotest.tko.parsers import base class NoHostnameError(Exception): diff --git a/tko/parsers/version_0_unittest.py b/tko/parsers/version_0_unittest.py index 40a589597f..252b12c357 100755 --- a/tko/parsers/version_0_unittest.py +++ b/tko/parsers/version_0_unittest.py @@ -6,9 +6,9 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.tko import models -from autotest_lib.tko.parsers import version_0 +from autotest.client.common_lib.test_utils import mock +from autotest.tko import models +from autotest.tko.parsers import version_0 class test_job_load_from_dir(unittest.TestCase): diff --git a/tko/parsers/version_1.py b/tko/parsers/version_1.py index 7448c4fd28..032bcb5eb6 100644 --- a/tko/parsers/version_1.py +++ b/tko/parsers/version_1.py @@ -1,7 +1,7 @@ import os, re, time -from autotest_lib.tko import models, status_lib, utils as tko_utils -from autotest_lib.tko.parsers import base, version_0 +from autotest.tko import models, status_lib, utils as tko_utils +from autotest.tko.parsers import base, version_0 class job(version_0.job): diff --git a/tko/parsers/version_1_unittest.py b/tko/parsers/version_1_unittest.py index 69dc5013c4..a2385e770c 100755 --- a/tko/parsers/version_1_unittest.py +++ b/tko/parsers/version_1_unittest.py @@ -6,8 +6,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils -from autotest_lib.tko.parsers import version_1 +from autotest.client.common_lib import utils +from autotest.tko.parsers import version_1 class test_status_line(unittest.TestCase): diff --git a/tko/retrieve_logs.cgi b/tko/retrieve_logs.cgi index 87c86d1309..2e2426c6da 100755 --- a/tko/retrieve_logs.cgi +++ b/tko/retrieve_logs.cgi @@ -5,9 +5,9 @@ try: import autotest.common except ImportError: import common -from autotest_lib.client.common_lib import global_config -from autotest_lib.client import utils -from autotest_lib.frontend.afe.json_rpc import serviceHandler +from autotest.client.common_lib import global_config +from autotest.client import utils +from autotest.frontend.afe.json_rpc import serviceHandler _PAGE = """\ Status: 302 Found @@ -20,11 +20,11 @@ def _retrieve_logs_dummy(job_path): pass site_retrieve_logs = utils.import_site_function(__file__, - "autotest_lib.tko.site_retrieve_logs", "site_retrieve_logs", + "autotest.tko.site_retrieve_logs", "site_retrieve_logs", _retrieve_logs_dummy) site_find_repository_host = utils.import_site_function(__file__, - "autotest_lib.tko.site_retrieve_logs", "site_find_repository_host", + "autotest.tko.site_retrieve_logs", "site_find_repository_host", _retrieve_logs_dummy) diff --git a/tko/setup.py b/tko/setup.py index 184e6ede0c..fe725bd78f 100644 --- a/tko/setup.py +++ b/tko/setup.py @@ -7,7 +7,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up tko_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/tko/status_lib.py b/tko/status_lib.py index b182023891..9eb318930a 100644 --- a/tko/status_lib.py +++ b/tko/status_lib.py @@ -3,7 +3,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import log +from autotest.client.common_lib import log statuses = log.job_statuses @@ -86,6 +86,6 @@ def size(self): def parser(version): - library = "autotest_lib.tko.parsers.version_%d" % version + library = "autotest.tko.parsers.version_%d" % version module = __import__(library, globals(), locals(), ["parser"]) return module.parser() diff --git a/tko/status_lib_unittest.py b/tko/status_lib_unittest.py index 6ee09e61b9..0346164483 100755 --- a/tko/status_lib_unittest.py +++ b/tko/status_lib_unittest.py @@ -5,8 +5,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.tko import status_lib -from autotest_lib.client.common_lib import log +from autotest.tko import status_lib +from autotest.client.common_lib import log class clean_raw_line_test(unittest.TestCase): diff --git a/tko/test.cgi b/tko/test.cgi index 9a82b5db38..5c1bfa4f3d 100755 --- a/tko/test.cgi +++ b/tko/test.cgi @@ -13,7 +13,7 @@ try: import autotest.common except ImportError: import common -from autotest_lib.tko import db, display, frontend +from autotest.tko import db, display, frontend db = db.db() diff --git a/tko/utils_unittest.py b/tko/utils_unittest.py index 10b1954bbc..86bd972813 100755 --- a/tko/utils_unittest.py +++ b/tko/utils_unittest.py @@ -6,8 +6,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib.test_utils import mock -from autotest_lib.tko import utils +from autotest.client.common_lib.test_utils import mock +from autotest.tko import utils class get_timestamp_test(unittest.TestCase): diff --git a/utils/build_externals.py b/utils/build_externals.py index 0822abe53c..9b4ceeee7a 100755 --- a/utils/build_externals.py +++ b/utils/build_externals.py @@ -18,12 +18,12 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import logging_config, logging_manager -from autotest_lib.client.common_lib import utils -from autotest_lib.utils import external_packages +from autotest.client.common_lib import logging_config, logging_manager +from autotest.client.common_lib import utils +from autotest.utils import external_packages # bring in site packages as well -utils.import_site_module(__file__, 'autotest_lib.utils.site_external_packages') +utils.import_site_module(__file__, 'autotest.utils.site_external_packages') # Where package source be fetched to relative to the top of the autotest tree. PACKAGE_DIR = 'ExternalSource' diff --git a/utils/check_control_file_vars.py b/utils/check_control_file_vars.py index 6df93d66d4..07bd5116ac 100755 --- a/utils/check_control_file_vars.py +++ b/utils/check_control_file_vars.py @@ -4,7 +4,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import control_data +from autotest.client.common_lib import control_data if len(sys.argv) != 2: print "Usage %s " % os.path.basename(sys.argv[0]) diff --git a/utils/check_patch.py b/utils/check_patch.py index 14bb1e5b32..7e249a2551 100755 --- a/utils/check_patch.py +++ b/utils/check_patch.py @@ -27,8 +27,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils, error, logging_config -from autotest_lib.client.common_lib import logging_manager +from autotest.client.common_lib import utils, error, logging_config +from autotest.client.common_lib import logging_manager class CheckPatchLoggingConfig(logging_config.LoggingConfig): diff --git a/utils/common.py b/utils/common.py index 0a5eb450af..228568bf49 100644 --- a/utils/common.py +++ b/utils/common.py @@ -11,4 +11,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/utils/compile_gwt_clients.py b/utils/compile_gwt_clients.py index 4168b6d726..448ca55ca7 100755 --- a/utils/compile_gwt_clients.py +++ b/utils/compile_gwt_clients.py @@ -4,8 +4,8 @@ except ImportError: import common import sys, os, shutil, errno, optparse, logging -from autotest_lib.client.common_lib import error, utils -from autotest_lib.client.common_lib import logging_config, logging_manager +from autotest.client.common_lib import error, utils +from autotest.client.common_lib import logging_config, logging_manager """ Compile All Autotest GWT Clients Living in autotest/frontend/client/src """ diff --git a/utils/coverage_suite.py b/utils/coverage_suite.py index 7ca66e9b78..98421f2798 100755 --- a/utils/coverage_suite.py +++ b/utils/coverage_suite.py @@ -2,7 +2,7 @@ import os, sys import unittest_suite -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) @@ -16,14 +16,14 @@ 'site_packages'] # append site specific invalid_dirs list, if any invalid_dirs.extend(utils.import_site_symbol( - __file__, 'autotest_lib.utils.site_coverage_suite', 'invalid_dirs', [])) + __file__, 'autotest.utils.site_coverage_suite', 'invalid_dirs', [])) invalid_files = ['unittest_suite.py', 'coverage_suite.py', '__init__.py', 'common.py'] # append site specific invalid_files list, if any invalid_files.extend(utils.import_site_symbol( - __file__, 'autotest_lib.utils.site_coverage_suite', 'invalid_files', [])) + __file__, 'autotest.utils.site_coverage_suite', 'invalid_files', [])) def is_valid_directory(dirpath): diff --git a/utils/external_packages.py b/utils/external_packages.py index 796975e9f8..0573948468 100644 --- a/utils/external_packages.py +++ b/utils/external_packages.py @@ -2,7 +2,7 @@ import logging, os, shutil, sys, tempfile, time, urllib2 import subprocess, re -from autotest_lib.client.common_lib import utils +from autotest.client.common_lib import utils _READ_SIZE = 64*1024 _MAX_PACKAGE_SIZE = 100*1024*1024 diff --git a/utils/modelviz/common.py b/utils/modelviz/common.py index 933ce49319..6033d44b8b 100644 --- a/utils/modelviz/common.py +++ b/utils/modelviz/common.py @@ -9,4 +9,4 @@ import setup_modules sys.path.pop(0) -setup_modules.setup(base_path=autotest_dir, root_module_name="autotest_lib") +setup_modules.setup(base_path=autotest_dir, root_module_name="autotest") diff --git a/utils/modelviz/generate_schema_diagrams.py b/utils/modelviz/generate_schema_diagrams.py index 7e34102f94..9ae357d926 100755 --- a/utils/modelviz/generate_schema_diagrams.py +++ b/utils/modelviz/generate_schema_diagrams.py @@ -21,11 +21,11 @@ def main(): for project, app in PROJECTS: - settings = 'autotest_lib.%s.settings' % project + settings = 'autotest.%s.settings' % project os.environ['DJANGO_SETTINGS_MODULE'] = settings # import after setting DJANGO_SETTINGS_MODULE - from autotest_lib.contrib import modelviz + from autotest.contrib import modelviz # hack to force reload of settings and app list import django.conf diff --git a/utils/packager.py b/utils/packager.py index fd6d743b5a..69a0299663 100755 --- a/utils/packager.py +++ b/utils/packager.py @@ -9,10 +9,10 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils as client_utils -from autotest_lib.client.common_lib import global_config, error -from autotest_lib.client.common_lib import base_packages, packages -from autotest_lib.server import utils as server_utils +from autotest.client.common_lib import utils as client_utils +from autotest.client.common_lib import global_config, error +from autotest.client.common_lib import base_packages, packages +from autotest.server import utils as server_utils c = global_config.global_config logging.basicConfig(level=logging.DEBUG) diff --git a/utils/read_config_var.py b/utils/read_config_var.py index 1e99f1cb75..ee508964b6 100755 --- a/utils/read_config_var.py +++ b/utils/read_config_var.py @@ -9,7 +9,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import global_config +from autotest.client.common_lib import global_config def usage(): diff --git a/utils/reverify_repair_failed.py b/utils/reverify_repair_failed.py index 6c628502bd..7465d69a28 100755 --- a/utils/reverify_repair_failed.py +++ b/utils/reverify_repair_failed.py @@ -14,7 +14,7 @@ import autotest.common as common except ImportError: import common -from autotest_lib.server import frontend +from autotest.server import frontend def main(): diff --git a/utils/run_pylint.py b/utils/run_pylint.py index 01d9ec0dbd..9a4232c420 100755 --- a/utils/run_pylint.py +++ b/utils/run_pylint.py @@ -21,11 +21,11 @@ open(pylintrc_path, 'w').close() -# patch up the logilab module lookup tools to understand autotest_lib.* trash +# patch up the logilab module lookup tools to understand autotest.* trash import logilab.common.modutils _ffm = logilab.common.modutils.file_from_modpath def file_from_modpath(modpath, path=None, context_file=None): - if modpath[0] == "autotest_lib": + if modpath[0] == "autotest": return _ffm(modpath[1:], path, context_file) else: return _ffm(modpath, path, context_file) @@ -35,7 +35,7 @@ def file_from_modpath(modpath, path=None, context_file=None): import pylint.lint from pylint.checkers import imports -ROOT_MODULE = 'autotest_lib.' +ROOT_MODULE = 'autotest.' # need to put autotest root dir on sys.path so pylint will be happy autotest_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) diff --git a/utils/setup.py b/utils/setup.py index 6ff3b9023f..1aa90beb9d 100644 --- a/utils/setup.py +++ b/utils/setup.py @@ -6,7 +6,7 @@ except ImportError: import common -from autotest_lib.client.common_lib import version +from autotest.client.common_lib import version # Mostly needed when called one level up utils_dir = os.path.dirname(sys.modules[__name__].__file__) or '.' diff --git a/utils/test_importer.py b/utils/test_importer.py index b8bc442ea4..f9d3cde9fb 100755 --- a/utils/test_importer.py +++ b/utils/test_importer.py @@ -32,10 +32,10 @@ except ImportError: import common import logging, re, os, sys, optparse, compiler -from autotest_lib.frontend import setup_django_environment -from autotest_lib.frontend.afe import models -from autotest_lib.client.common_lib import control_data, utils -from autotest_lib.client.common_lib import logging_config, logging_manager +from autotest.frontend import setup_django_environment +from autotest.frontend.afe import models +from autotest.client.common_lib import control_data, utils +from autotest.client.common_lib import logging_config, logging_manager class TestImporterLoggingConfig(logging_config.LoggingConfig): @@ -218,7 +218,7 @@ def update_tests_in_db(tests, dry_run=False, add_experimental=False, (see global_config.ini, COMMON, autotest_top_path). """ site_set_attributes_module = utils.import_site_module( - __file__, 'autotest_lib.utils.site_test_importer_attributes') + __file__, 'autotest.utils.site_test_importer_attributes') for test in tests: new_test = models.Test.objects.get_or_create( diff --git a/utils/tko_publish.py b/utils/tko_publish.py index b3842b29b8..e4310b9322 100755 --- a/utils/tko_publish.py +++ b/utils/tko_publish.py @@ -14,8 +14,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.client.common_lib import utils -from autotest_lib.server import frontend +from autotest.client.common_lib import utils +from autotest.server import frontend options = optparse.Values() diff --git a/utils/unittest_suite.py b/utils/unittest_suite.py index 5ce02a4aac..262cb8e777 100755 --- a/utils/unittest_suite.py +++ b/utils/unittest_suite.py @@ -5,8 +5,8 @@ import autotest.common as common except ImportError: import common -from autotest_lib.utils import parallel -from autotest_lib.client.common_lib.test_utils import unittest as custom_unittest +from autotest.utils import parallel +from autotest.client.common_lib.test_utils import unittest as custom_unittest parser = optparse.OptionParser() parser.add_option("-r", action="store", type="string", dest="start", @@ -143,7 +143,7 @@ def scan_for_modules(start, options): path_no_py = os.path.join(dirpath, fname).rstrip('.py') assert path_no_py.startswith(ROOT) names = path_no_py[len(ROOT)+1:].split('/') - modules.append(['autotest_lib'] + names) + modules.append(['autotest'] + names) if options.debug: print 'testing', path_no_py return modules