Convert remainder of tests to use logging

As cerberus, lsb_dtk and dma_memtest had more work to do, they went into
separate patches. This patch now finishes the work of converting tests
to use logging statements. What was done:

 * In one test (aiostress), the values of self.srcdir, self.bindir and
self.tmpdir were being print. As this seems to be a debug statement from
early code that doesn't seem necessary anymore, it was removed.
 * In some tests, the command being executed was being printed out,
followed by a utils.system call. As this sort of command print is a
debugging statement, and as utils.system already logs the command being
executed, in such cases, the command string print was simply removed
 * The form print >> file_object, "foo" was replaced by the equivalent
file_object.write(foo) as it is more clear.
 * Conversion of print statements to logging statements.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3190 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/tsc/tsc.py b/client/tests/tsc/tsc.py
index fcd1e8e..7077784 100755
--- a/client/tests/tsc/tsc.py
+++ b/client/tests/tsc/tsc.py
@@ -1,4 +1,4 @@
-import os, re
+import os, re, logging
 from autotest_lib.client.bin import test, utils
 from autotest_lib.client.common_lib import error
 
@@ -19,8 +19,9 @@
     def run_once(self, args = '-t 650'):
         result = utils.run(self.srcdir + '/checktsc ' + args,
                            ignore_status=True)
-        print 'result.exit_status', result.exit_status
         if result.exit_status != 0:
+            logging.error('Program checktsc exit status is %s',
+                          result.exit_status)
             default_reason = ("UNKNOWN FAILURE: rc=%d from %s" %
                               (result.exit_status, result.command))
             ## Analyze result.stdout to see if it is possible to form qualified