1b87bc53ddf0a18e85df7a862df9d559c8bec438 |
|
04-Apr-2008 |
mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> |
Modify all the common.py to set up an autotest_lib.* namespace as well as all the common.* module setup that it normally does. This should make it easier to replace any funky sys.path code with code that actually does the right thing, and imports modules using absolute paths; as long as our entry points import common, code should be able to count on imports like "import autotest_lib.tko.parse" or "import autotest_lib.server.autotest" working, without having to fiddle with sys.path themselves. The client/bin/common.py is an exception; we can't assume anything other than the client/ directory is present, so it only adds the autotest_lib.client.* namespace. So code within the client itself should only do absolute imports from the client directory downward, not from the top-level dir downward. We'll probably need to add __init__.py files to some directories to allow us to import from them as packages, but that can be done on an as-needed basis when we write import statements that require them. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: http://test.kernel.org/svn/autotest/trunk@1397 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/common.py
|
8375088a4ed43357a7abe1b6cab83c0e5ce79cfa |
|
28-Feb-2008 |
mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> |
Fix a few misses in the global_config patch global_config.py import sys common.py change import from top_level_dir to client From: Scott Zawalski <scottz@google.com> Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: http://test.kernel.org/svn/autotest/trunk@1276 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/common.py
|
0c3548d838c50decb2d48ed20648f6a84d5dd4c5 |
|
01-Feb-2008 |
mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> |
Move check_version into the common utils and make sure we run it for any autotest binaries which require 2.4. Signed-off-by: Jeremy Orlow <jorlow@google.com> git-svn-id: http://test.kernel.org/svn/autotest/trunk@1214 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/common.py
|
dc11c3f0428e8c53758ae489e42c2818d28fa690 |
|
29-Nov-2007 |
mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> |
Change common.py'>common.py so that it inserts all of the libraries it loads into sys.modules, so that we can import specific submodules directly (e.g. "import common.logging") or specific contents of submodules (e.g. "from common.logging import record") instead of only being able to import the top-level common module. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: http://test.kernel.org/svn/autotest/trunk@1001 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/common.py
|
c335c7d100463f7c2732ec0426ab22ac434cc0d8 |
|
12-Nov-2007 |
mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> |
Add support for a common library area, usable by both server and client code. This isn't as clean as I would like, but it's the best mechanism I could find. If you have suggestions please send them my way. To add libraries, add a .py file (e.g. mylib.py) under client/common_lib, and add the module name to __all__ in __init__.py (e.g. __all__ = ['mylib']). Then, from the server or the client, you can use 'from common import mylib'. From: showard@google.com git-svn-id: http://test.kernel.org/svn/autotest/trunk@935 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/server/common.py
|