[Lldb-commits] [PATCH] D18017: Eliminate the TestStarted-XXX and TestFinished-XXX files from the test traces

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 9 15:41:09 PST 2016

amccarth created this revision.
amccarth added reviewers: tfiala, zturner.
amccarth added a subscriber: lldb-commits.

Nobody seems to know what purpose these files serve, yet they were accumulating by the thousands in the test traces directory.  I'm proposing we delete them.

Creating these files accounted for about 2.5% of the time to run ninja check-lldb on my machine, which isn't a lot, but it's something.



Index: packages/Python/lldbsuite/test/dotest.py
--- packages/Python/lldbsuite/test/dotest.py
+++ packages/Python/lldbsuite/test/dotest.py
@@ -987,12 +987,6 @@
         except OSError as exception:
             if exception.errno != errno.EEXIST:
-    where_to_save_session = os.getcwd()
-    fname = os.path.join(configuration.sdir_name, "TestStarted-%d" % os.getpid())
-    with open(fname, "w") as f:
-        print("Test started at: %s\n" % timestamp_started, file=f)
-        print(configuration.svn_info, file=f)
-        print("Command invoked: %s\n" % getMyCommandLine(), file=f)
     # Invoke the default TextTestRunner to run the test suite, possibly iterating
@@ -1109,11 +1103,6 @@
         for category in configuration.failuresPerCategory:
             sys.stderr.write("%s - %d\n" % (category, configuration.failuresPerCategory[category]))
-    os.chdir(where_to_save_session)
-    fname = os.path.join(configuration.sdir_name, "TestFinished-%d" % os.getpid())
-    with open(fname, "w") as f:
-        print("Test finished at: %s\n" % datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S"), file=f)
     # 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):

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18017.50209.patch
Type: text/x-patch
Size: 1391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160309/1647806b/attachment.bin>

More information about the lldb-commits mailing list