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 --- libs/utils/atfutils.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/utils/atfutils.py') diff --git a/libs/utils/atfutils.py b/libs/utils/atfutils.py index b6f5174..b5fa16d 100644 --- a/libs/utils/atfutils.py +++ b/libs/utils/atfutils.py @@ -7,6 +7,7 @@ *) set_active_volume """ import re +import time import inspect from atfglobals import GlobalObj @@ -178,3 +179,10 @@ def get_active_volume(): if active_volume is None: logger.error("Active Volume not set in the TestEnvironment") return active_volume + +def attach_timestamp(filename): + """ + """ + timestamp = time.strftime("%Y_%m_%d_%H_%M_%S") + new_filename = '.'.join([filename, timestamp]) + return new_filename -- cgit