From a60c5ad819b958c54cb3d8599925e9d943698477 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 16 Aug 2012 19:15:21 +0000 Subject: [PATCH] Catch timestamps for the beginning and end of the test suite run. llvm-svn: 162040 --- lldb/test/dotest.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py index ef4e12997f5c..4a2084c3201f 100755 --- a/lldb/test/dotest.py +++ b/lldb/test/dotest.py @@ -1097,11 +1097,11 @@ unittest2.signals.installHandler() # later on. # # See also TestBase.dumpSessionInfo() in lldbtest.py. +import datetime +# The windows platforms don't like ':' in the pathname. +timestamp_started = datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S") if not sdir_name: - import datetime - # The windows platforms don't like ':' in the pathname. - timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S") - sdir_name = timestamp + sdir_name = timestamp_started os.environ["LLDB_SESSION_DIRNAME"] = os.path.join(os.getcwd(), sdir_name) if not noHeaders: @@ -1111,8 +1111,9 @@ if not noHeaders: if not os.path.isdir(sdir_name): os.mkdir(sdir_name) -fname = os.path.join(sdir_name, "svn-info") +fname = os.path.join(sdir_name, "TestStarted") with open(fname, "w") as f: + print >> f, "Test started at: %s\n" % timestamp_started print >> f, svn_info print >> f, "Command invoked: %s\n" % getMyCommandLine() @@ -1363,6 +1364,10 @@ if sdir_has_content: sys.stderr.write("Session logs for test failures/errors/unexpected successes" " can be found in directory '%s'\n" % sdir_name) +fname = os.path.join(sdir_name, "TestFinished") +with open(fname, "w") as f: + print >> f, "Test finished at: %s\n" % datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S") + # Terminate the test suite if ${LLDB_TESTSUITE_FORCE_FINISH} is defined. # This should not be necessary now. if ("LLDB_TESTSUITE_FORCE_FINISH" in os.environ):