[Lldb-commits] [lldb] r162040 - /lldb/trunk/test/dotest.py

Johnny Chen johnny.chen at apple.com
Thu Aug 16 12:15:21 PDT 2012


Author: johnny
Date: Thu Aug 16 14:15:21 2012
New Revision: 162040

URL: http://llvm.org/viewvc/llvm-project?rev=162040&view=rev
Log:
Catch timestamps for the beginning and end of the test suite run.

Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=162040&r1=162039&r2=162040&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Thu Aug 16 14:15:21 2012
@@ -1097,11 +1097,11 @@
 # 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 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 @@
     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):





More information about the lldb-commits mailing list