[Lldb-commits] [lldb] r118315 - /lldb/trunk/test/lldbtest.py
Johnny Chen
johnny.chen at apple.com
Fri Nov 5 17:07:07 PDT 2010
Author: johnny
Date: Fri Nov 5 19:07:07 2010
New Revision: 118315
URL: http://llvm.org/viewvc/llvm-project?rev=118315&view=rev
Log:
Make the type of session log part of the filename itself. It allows for easier
identification of the test failures/errors by human beings as well as automatic
processings.
The prefix which identifies the type can be: Error, Failure, or ExpectedFailure.
Modified:
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=118315&r1=118314&r2=118315&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri Nov 5 19:07:07 2010
@@ -544,10 +544,13 @@
# See http://docs.python.org/library/unittest.html#unittest.TestResult.
if self.__errored__:
pairs = lldb.test_result.errors
+ prefix = 'Error'
elif self.__failed__:
pairs = lldb.test_result.failures
+ prefix = 'Failure'
elif self.__expected__:
pairs = lldb.test_result.expectedFailures
+ prefix = 'ExpectedFailure'
else:
# Simply return, there's no session info to dump!
return
@@ -560,7 +563,7 @@
os.environ["LLDB_SESSION_DIRNAME"])
if not os.path.isdir(dname):
os.mkdir(dname)
- fname = os.path.join(dname, "%s.log" % self.id())
+ fname = os.path.join(dname, "%s-%s.log" % (prefix, self.id()))
with open(fname, "w") as f:
import datetime
print >> f, "Session info generated @", datetime.datetime.now().ctime()
More information about the lldb-commits
mailing list