[Lldb-commits] [lldb] r239188 - Unique file names for TestStarted and TestFinished.
Chaoren Lin
chaorenl at google.com
Fri Jun 5 14:08:25 PDT 2015
Author: chaoren
Date: Fri Jun 5 16:08:24 2015
New Revision: 239188
URL: http://llvm.org/viewvc/llvm-project?rev=239188&view=rev
Log:
Unique file names for TestStarted and TestFinished.
Summary: This fixes the issue of multiple test suites opening the same file for writing.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10284
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=239188&r1=239187&r2=239188&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Fri Jun 5 16:08:24 2015
@@ -1397,7 +1397,7 @@ if not os.path.isdir(sdir_name):
if exception.errno != errno.EEXIST:
raise
where_to_save_session = os.getcwd()
-fname = os.path.join(sdir_name, "TestStarted")
+fname = os.path.join(sdir_name, "TestStarted-%d" % os.getpid())
with open(fname, "w") as f:
print >> f, "Test started at: %s\n" % timestamp_started
print >> f, svn_info
@@ -1774,7 +1774,7 @@ if useCategories and len(failuresPerCate
sys.stderr.write("%s - %d\n" % (category,failuresPerCategory[category]))
os.chdir(where_to_save_session)
-fname = os.path.join(sdir_name, "TestFinished")
+fname = os.path.join(sdir_name, "TestFinished-%d" % os.getpid())
with open(fname, "w") as f:
print >> f, "Test finished at: %s\n" % datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
More information about the lldb-commits
mailing list