From 4a0b5f9d0e0266c8c67b5faa76599fc78a247437 Mon Sep 17 00:00:00 2001 From: shwetha Date: Tue, 6 Mar 2012 16:14:34 +0530 Subject: Adding libraries to suffix timestamps to the summarylog and detaillog files Change-Id: I853981b0de99372509649360a67e8c4cca24b415 Signed-off-by: shwetha --- atfexecute.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'atfexecute.py') diff --git a/atfexecute.py b/atfexecute.py index c793cbb..bf5a9db 100644 --- a/atfexecute.py +++ b/atfexecute.py @@ -5,6 +5,7 @@ import sys import imp from atfglobals import GlobalObj import pdb +import atfutils def _execute_testunit(testunitname): """ @@ -20,8 +21,8 @@ def _execute_testunit(testunitname): testunits_maindir = GlobalObj.testunits_maindir testunit_mainmodule = GlobalObj.testunit_mainmodule testunit_abspath = os.path.join(atfdir, testunits_maindir, testunitname) - - + + _file, path, description = imp.find_module(testunit_mainmodule, [testunit_abspath]) @@ -38,9 +39,11 @@ def _execute_testunit(testunitname): (testunit_mainmodule, testunitname)) logger.error("%s execution Failed" % testunitname) return_status = 0 - + else: detaillog_abspath = os.path.join(testunit_abspath, detaillog_file) + if GlobalObj.attach_timestamp is 'yes': + detaillog_abspath = atfutils.attach_timestamp(detaillog_abspath) if logger.addDetaillogHandler(detaillog_abspath, detaillog_level): logger.error("Unbale to add Detaillog Handler for testunit: %s" % testunitname) -- cgit