History log of /external/autotest/client/common_lib/__init__.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b83b145de9835882bbefd0c7f3d117212083dad7 24-Mar-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Drop the unusual __init__.py and site_libraries.py we have in common_lib.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4332 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
b18134f8faa7c5b4623760bc88650a65e70b2cac 20-Mar-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> As discussed on the mailing list, we implemented logging with a single
root logger and logging configurations per entry points. The entry
points affected are:

* Autotest client
* Autoserv
* Scheduler

We are sending patches for each one of those entry points. Now we don't
need to 'grab' loggers anymore to log messages, only need to use the
utility functions:

logging.info('msg')
logging.debug('msg')
logging.warning('msg')
logging.error('msg')
logging.critical('msg')

Which reduces complexity of the log system, and makes it easier for
developers to log messages, just select the level, make sure the
standard logging module is loaded, and profit!

From: Lucas Meneghel Rodrigues <lmr@linux.vnet.ibm.com>
Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2915 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
2dc36b6466d7acb5c865398d5692a2bffd453550 09-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adding a library with debug functions to client/common_lib to help with
the logging process.

This library has functions to read and write information on a file,
debug.ini. This file is supposed to contain debugging information for
the 3 autotest code sessions:

* Server
* Client
* Tests

So we can choose different levels of logging for each one of these
levels. This patch is supposed to be applied after the patch that
renames the autotest logger module to log.

This patch addresses the comments made by Steve:

* Now we parse the configuration file once. Steve, I really did try to
implement the lazy load like you described, but I just couldn't get it
to work. So I represented the debug parser as a class and used a design
patterns that ensures that we read the parser only once at each autotest
or autoserv execution.
* No more delegates, just a function that returns the root logger
properly configured (even though I still think the delegates would be
useful convenience functions).

I hope it looks good now. I've tested and it produces the wanted
results. I'll send a last patch with some suggestions on how to use the
library and make the verbosity on a default autotest/autoserv run a lot
smaller, with only 2 print conversions.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2260 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
1b3b376d94edee8f235f8669a047dc00751bf97a 25-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename client/common_lib/logging.py to client/common_lib/log.py in order to be able to use the standard python logging module

Python has a standard module used to perform logging operations
(http://docs.python.org/lib/module-logging.html) that could be used
inside autotest, however we have a common_lib module named logging as
well, that makes difficult to import the python logging module in all
other parts of autotest (including tests).

So this patch basically renames logging to log and fixes all references
to it. All the files touched were pylinted and basic sanity testing was
made (running autotest with different control files).

About the risks, in my opinion it's worth the effort, since we gain the
ability to use a powerful logging library, that would help us to
implement a better logging system inside all autotest modules.

Risk: Medium/High - Even though care was taken to ensure all references
to logging were changed, it touches a fair bit of the code and something
might have passed unaudited.

Visibility: Low - Should be invisible for all users, and developers must
just remember that now logging is called log.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2193 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
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/client/common_lib/__init__.py
929b378aa28a72a693df19a600df4c4c9f535c56 28-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move the email code currently used by the parser over to the common
library.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1378 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
ed4d6ddc79993492b22aeeb36574b3cb7c8bad44 27-Feb-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> glocal_config patch

This patch contains the global_config class and the global_config.ini file (located in root dir). This patch also includes changes to tko/db.py so that rather than using tko/.database and tko/.priv_login, it reads the needed info from the global_config

travis miller





git-svn-id: http://test.kernel.org/svn/autotest/trunk@1271 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
ea397bbc85f1a3eda39c9f2ef4fc209b4ff336f4 02-Feb-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Refactor the server and client side test classes into a the common lib

Big change here. Pull all of the common code in the server and client
versions of test into the common lib. This also requires pulling
chunks of the client and server utility functions into the common lib
as well.

Signed-off-by: John Admanski <jadmanski@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1215 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.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/client/common_lib/__init__.py
d8e82f96df023192d3ed4f8144bdae3e12f1f117 11-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Right now (revision 1054), server/server_job.py is importing barrier.py
from client/common_lib. However, __init__.py doesn't have barrier listed
on the module list, making autoserv throw an exception. This patch fixes
that problem.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1055 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
f31b0c0060dd688c80be3bb97ffdfa193e3d924b 29-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move error.py'>error.py'>error.py out of the client and server and into common_lib.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1003 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.py
119c12a73ec74ea7f259f7db39d994055db1b609 12-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Extract the logging decorator used in kernel.py into a common library
and add it to Autotest.install to provide logging of autotest
installation failure (and success).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@937 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/__init__.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/client/common_lib/__init__.py