summaryrefslogtreecommitdiffstats
path: root/lldb/examples/test
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2012-08-22 20:25:33 +0000
committerJohnny Chen <johnny.chen@apple.com>2012-08-22 20:25:33 +0000
commitd79f06cf12e0eed14f2d7e8139f2e3a114bcb74a (patch)
treee1588532ca4e6b471d3de648df8a0edebdbd569d /lldb/examples/test
parent326702f1a10db99ac7a25dfbe40d5dd0d7d66609 (diff)
downloadbcm5719-llvm-d79f06cf12e0eed14f2d7e8139f2e3a114bcb74a.tar.gz
bcm5719-llvm-d79f06cf12e0eed14f2d7e8139f2e3a114bcb74a.zip
Modified .lldb-loggings now to direct the lldb log files to the same session directory which also houses the test logs.
llvm-svn: 162387
Diffstat (limited to 'lldb/examples/test')
-rw-r--r--lldb/examples/test/.lldb-loggings6
-rw-r--r--lldb/examples/test/usage-lldb-loggings62
2 files changed, 67 insertions, 1 deletions
diff --git a/lldb/examples/test/.lldb-loggings b/lldb/examples/test/.lldb-loggings
index 58467b899a7..9c92bd95847 100644
--- a/lldb/examples/test/.lldb-loggings
+++ b/lldb/examples/test/.lldb-loggings
@@ -3,7 +3,11 @@ def pre_flight(self):
import lldb
import lldbtest
- dest = os.path.join("/tmp", "lldb_log-%s-%s-%s.txt" % (self.getArchitecture(), self.getCompiler(), self.id()))
+ dname = os.path.join(os.environ["LLDB_TEST"],
+ os.environ["LLDB_SESSION_DIRNAME"])
+ if not os.path.isdir(dname):
+ os.mkdir(dname)
+ dest = os.path.join(dname, "lldb_log-%s-%s-%s.txt" % (self.getArchitecture(), self.getCompiler(), self.id()))
print "\nEnabling lldb logging for test case:", self
print "with log destination:", dest
self.runCmd("log enable -f %s gdb-remote packets process" % dest)
diff --git a/lldb/examples/test/usage-lldb-loggings b/lldb/examples/test/usage-lldb-loggings
index c721ec295a0..b7d7e2e58fc 100644
--- a/lldb/examples/test/usage-lldb-loggings
+++ b/lldb/examples/test/usage-lldb-loggings
@@ -61,3 +61,65 @@ OK
-rw-r----- 1 johnny wheel 614614 Aug 22 11:36 /tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt
-rw-r----- 1 johnny wheel 614614 Aug 22 11:36 /tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt
[11:37:09] johnny:/Volumes/data/lldb/svn/ToT/test $
+
+#
+# And this shows the log files go into the session directory.
+# Note that the .lldb-loggings file is modified to get the session directory now.
+#
+
+[11:37:09] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-loggings functionalities/breakpoint/breakpoint_command
+config: {'pre_flight': <function pre_flight at 0x10ca5c1b8>}
+LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug
+LLDB-165
+Path: /Volumes/data/lldb/svn/ToT
+URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk
+Repository Root: https://johnny@llvm.org/svn/llvm-project
+Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
+Revision: 162231
+Node Kind: directory
+Schedule: normal
+Last Changed Author: johnny
+Last Changed Rev: 162228
+Last Changed Date: 2012-08-20 14:16:02 -0700 (Mon, 20 Aug 2012)
+
+
+lldb.pre_flight: def pre_flight(self):
+ import os
+ import lldb
+ import lldbtest
+
+ dname = os.path.join(os.environ["LLDB_TEST"],
+ os.environ["LLDB_SESSION_DIRNAME"])
+ if not os.path.isdir(dname):
+ os.mkdir(dname)
+ dest = os.path.join(dname, "lldb_log-%s-%s-%s.txt" % (self.getArchitecture(), self.getCompiler(), self.id()))
+ print "\nEnabling lldb logging for test case:", self
+ print "with log destination:", dest
+ self.runCmd("log enable -f %s gdb-remote packets process" % dest)
+
+lldb.post_flight: None
+
+Session logs for test failures/errors/unexpected successes will go into directory '2012-08-22-13_21_46'
+Command invoked: python ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-loggings functionalities/breakpoint/breakpoint_command
+compilers=['clang']
+
+Configuration: arch=x86_64 compiler=clang
+----------------------------------------------------------------------
+Collected 2 tests
+
+1: test_with_dsym (TestBreakpointCommand.BreakpointCommandTestCase)
+ Test a sequence of breakpoint command add, list, and delete. ...
+Enabling lldb logging for test case: test_with_dsym (TestBreakpointCommand.BreakpointCommandTestCase)
+with log destination: /Volumes/data/lldb/svn/ToT/test/2012-08-22-13_21_46/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt
+ok
+2: test_with_dwarf (TestBreakpointCommand.BreakpointCommandTestCase)
+ Test a sequence of breakpoint command add, list, and delete. ...
+Enabling lldb logging for test case: test_with_dwarf (TestBreakpointCommand.BreakpointCommandTestCase)
+with log destination: /Volumes/data/lldb/svn/ToT/test/2012-08-22-13_21_46/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt
+ok
+
+----------------------------------------------------------------------
+Ran 2 tests in 8.575s
+
+OK
+[13:21:55] johnny:/Volumes/data/lldb/svn/ToT/test $
OpenPOWER on IntegriCloud