Make autoserv and autotest client use the new logging_manager system.  I'd like to split them into separate changes, but the change in common_lib.test means it all has to change at once.

this replaces the old ini-style logging configurations with code-based configurations.  i know the ini files were easier to read, but we're doing a lot more fancy stuff with logging and these give us much more power and less duplication.  as one example, we'll probably move very soon to having separate .DEBUG, .INFO, .WARNING, and .ERROR logs.  This will allow us to make a centralized change to make that happen, rather than duplicating a whole bunch of information across .ini files, and it'll make the information much more concise.

Risk: Gravely high

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3243 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/kernel_unittest.py b/client/bin/kernel_unittest.py
index a0437ba..58986e2 100755
--- a/client/bin/kernel_unittest.py
+++ b/client/bin/kernel_unittest.py
@@ -3,22 +3,9 @@
 import unittest, os, time, re, glob
 import common
 from autotest_lib.client.common_lib.test_utils import mock
-
-# need to import this guy first and then stub out before kernel import
-from autotest_lib.client.bin import fd_stack
-fd_stack.tee_output_logdir_mark = lambda f: f
-
-# finish up imports
 from autotest_lib.client.bin import kernel, job, utils, kernelexpand
 from autotest_lib.client.bin import kernel_config, boottool, os_dep
 
-# we need to reload the kernel to make sure its fresh so that our
-# stub of the tee_output_logdir_mark decorator "takes" since in the
-# context of the unittest_suite kernel may already have been loaded.
-reload(kernel)
-
-
-
 class TestKernel(unittest.TestCase):
     def setUp(self):
         self.god = mock.mock_god()
@@ -45,11 +32,24 @@
         self.god.stub_function(kernelexpand, "expand_classic")
         self.god.stub_function(kernel_config, "modules_needed")
         self.god.stub_function(glob, "glob")
+        def dummy_mark(filename, msg):
+            pass
+        self.god.stub_with(kernel, '_mark', dummy_mark)
 
         self.job = self.god.create_mock_class(job.job, "job")
         self.job.bootloader = self.god.create_mock_class(boottool.boottool,
                                                          "boottool")
 
+        class DummyLoggingManager(object):
+            def tee_redirect_debug_dir(self, *args, **kwargs):
+                pass
+
+
+            def restore(self, *args, **kwargs):
+                pass
+
+        self.job.logging = DummyLoggingManager()
+
         self.job.autodir = "autodir"
         self.base_tree = "2.6.24"
         self.tmp_dir = "tmpdir"