summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-11-06 00:07:07 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-11-06 00:07:07 +0000
commitf7f9d9d88045f8d680cc8062535d94c124edbb98 (patch)
tree618bf29357b13bac50ba3e083b1ad6d9c8263fab
parent7d391557ccfb3edfc3036057099a8885f35ea1d5 (diff)
downloadbcm5719-llvm-f7f9d9d88045f8d680cc8062535d94c124edbb98.tar.gz
bcm5719-llvm-f7f9d9d88045f8d680cc8062535d94c124edbb98.zip
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. llvm-svn: 118315
-rw-r--r--lldb/test/lldbtest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index 2cefb814a35..7f1428e3ef4 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -544,10 +544,13 @@ class TestBase(unittest2.TestCase):
# 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 @@ class TestBase(unittest2.TestCase):
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()
OpenPOWER on IntegriCloud