diff options
Diffstat (limited to 'examples/test')
-rw-r--r-- | examples/test/.lldb-loggings | 20 | ||||
-rw-r--r-- | examples/test/.lldb-pre-post-flight | 12 | ||||
-rw-r--r-- | examples/test/.lldb-pre-post-flight.bad | 8 | ||||
-rw-r--r-- | examples/test/.lldbtest-config | 6 | ||||
-rw-r--r-- | examples/test/.lldbtest-config2 | 19 | ||||
-rw-r--r-- | examples/test/lldbtest-stderr | 39 | ||||
-rw-r--r-- | examples/test/lldbtest-stdout | 0 | ||||
-rw-r--r-- | examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt | 55 | ||||
-rw-r--r-- | examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt | 55 | ||||
-rw-r--r-- | examples/test/usage-config | 10 | ||||
-rw-r--r-- | examples/test/usage-lldb-loggings | 125 | ||||
-rw-r--r-- | examples/test/usage-pre-post-flight | 65 |
12 files changed, 414 insertions, 0 deletions
diff --git a/examples/test/.lldb-loggings b/examples/test/.lldb-loggings new file mode 100644 index 000000000000..9c92bd958479 --- /dev/null +++ b/examples/test/.lldb-loggings @@ -0,0 +1,20 @@ +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) + +#def post_flight(test): +# __import__("lldb") +# __import__("lldbtest") +# print "\nRunning post-flight function:" +# print "for test case:", test + diff --git a/examples/test/.lldb-pre-post-flight b/examples/test/.lldb-pre-post-flight new file mode 100644 index 000000000000..c1568a7295a7 --- /dev/null +++ b/examples/test/.lldb-pre-post-flight @@ -0,0 +1,12 @@ +def pre_flight(test): + __import__("lldb") + __import__("lldbtest") + print "\nRunning pre-flight function:" + print "for test case:", test + +def post_flight(test): + __import__("lldb") + __import__("lldbtest") + print "\nRunning post-flight function:" + print "for test case:", test + diff --git a/examples/test/.lldb-pre-post-flight.bad b/examples/test/.lldb-pre-post-flight.bad new file mode 100644 index 000000000000..0e17f3cdc95b --- /dev/null +++ b/examples/test/.lldb-pre-post-flight.bad @@ -0,0 +1,8 @@ +pre_flight = "I am not callable" + +def post_flight(test): + __import__("lldb") + __import__("lldbtest") + print "\nRunning post-flight function:" + print "for test case:", test + diff --git a/examples/test/.lldbtest-config b/examples/test/.lldbtest-config new file mode 100644 index 000000000000..31b489207778 --- /dev/null +++ b/examples/test/.lldbtest-config @@ -0,0 +1,6 @@ +sys.stderr = open("/tmp/lldbtest-stderr", "w") +sys.stdout = open("/tmp/lldbtest-stdout", "w") +compilers = ["gcc", "llvm-gcc"] +archs = ["x86_64", "i386"] +split_stderr = True # This will split the stderr into configuration-specific file +split_stdout = True # This will split the stdout into configuration-specific file diff --git a/examples/test/.lldbtest-config2 b/examples/test/.lldbtest-config2 new file mode 100644 index 000000000000..bf44726fd7f2 --- /dev/null +++ b/examples/test/.lldbtest-config2 @@ -0,0 +1,19 @@ +# Example config file for running the test suite for both 64 and 32-bit +# architectures. +# +# I use the following command to invoke the test driver: +# +# /Volumes/data/lldb/svn/trunk/test $ ./dotest.py -r /Volumes/data/lldb-test/archs -s session -c ../examples/test/.lldbtest-config2 -v -w . 2> ~/Developer/Log/lldbtest.log +# +# The '-r' option tells the driver to relocate the test execution to +# /Volumes/data/lldb-test/archs which must not exist before the run. +# +# Test failures/errors will be recorded into the 'session' directory due to the +# '-s' option, e.g., /Volumes/data/lldb-test/archs.arch=i386/test/session could +# contain the following three session info files: +# +# -rw-r--r-- 1 johnny admin 1737 Oct 25 13:25 TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command.log +# -rw-r--r-- 1 johnny admin 1733 Oct 25 13:25 TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_run_command.log +# -rw-r--r-- 1 johnny admin 4677 Oct 25 13:26 TestObjCMethods.FoundationTestCase.test_data_type_and_expr_with_dsym.log + +archs = ["x86_64", "i386"] diff --git a/examples/test/lldbtest-stderr b/examples/test/lldbtest-stderr new file mode 100644 index 000000000000..7934d92835cc --- /dev/null +++ b/examples/test/lldbtest-stderr @@ -0,0 +1,39 @@ +---------------------------------------------------------------------- +Collected 1 test + + +Configuration: arch=x86_64 compiler=gcc +test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) +Test that lldb persistent variables works correctly. ... ok + +---------------------------------------------------------------------- +Ran 1 test in 1.397s + +OK + +Configuration: arch=x86_64 compiler=llvm-gcc +test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) +Test that lldb persistent variables works correctly. ... ok + +---------------------------------------------------------------------- +Ran 1 test in 1.282s + +OK + +Configuration: arch=i386 compiler=gcc +test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) +Test that lldb persistent variables works correctly. ... ok + +---------------------------------------------------------------------- +Ran 1 test in 1.297s + +OK + +Configuration: arch=i386 compiler=llvm-gcc +test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) +Test that lldb persistent variables works correctly. ... ok + +---------------------------------------------------------------------- +Ran 1 test in 1.269s + +OK diff --git a/examples/test/lldbtest-stdout b/examples/test/lldbtest-stdout new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/examples/test/lldbtest-stdout diff --git a/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt b/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt new file mode 100644 index 000000000000..c1448cd844c2 --- /dev/null +++ b/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt @@ -0,0 +1,55 @@ +com.apple.main-thread /Volumes/data/lldb/svn/ToT/build/Debug/LLDB.framework/Versions/A/Resources/debugserver arguments: +argv[0]="/Volumes/data/lldb/svn/ToT/build/Debug/LLDB.framework/Versions/A/Resources/debugserver" +argv[1]="localhost:14953" +argv[2]="--native-regs" +argv[3]="--setsid" +argv[4]=NULL + + +com.apple.main-thread Host::LaunchProcess (launch_info) => pid=55237, path='/Volumes/data/lldb/svn/ToT/build/Debug/LLDB.framework/Versions/A/Resources/debugserver' err = 0x00000000 +com.apple.main-thread ProcessGDBRemote::StartAsyncThread () +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc1883400, pid = 0) thread starting... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc1883400, pid = 0) listener.WaitForEvent (NULL, event_sp)... +com.apple.main-thread < 1> send packet: + +com.apple.main-thread history[1] tid=0x1307 < 1> send packet: + +com.apple.main-thread < 19> send packet: $QStartNoAckMode#b0 +com.apple.main-thread < 1> read packet: + +com.apple.main-thread < 6> read packet: $OK#9a +com.apple.main-thread < 1> send packet: + +com.apple.main-thread < 26> send packet: $QThreadSuffixSupported#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 27> send packet: $QListThreadsInStopReply#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 13> send packet: $qHostInfo#00 +com.apple.main-thread < 122> read packet: $cputype:16777223;cpusubtype:3;ostype:macosx;watchpoint_exceptions_received:after;vendor:apple;endian:little;ptrsize:8;#00 +com.apple.main-thread < 10> send packet: $vCont?#00 +com.apple.main-thread < 17> read packet: $vCont;c;C;s;S#00 +com.apple.main-thread < 27> send packet: $qVAttachOrWaitSupported#00 +com.apple.main-thread < 6> read packet: $OK#00 + +... + +com.apple.main-thread ProcessGDBRemote::DoDestroy() +com.apple.main-thread < 5> send packet: $k#00 +com.apple.main-thread error: failed to get response for 'k' +com.apple.main-thread ProcessGDBRemote::DoDestroy - failed to send k packet +com.apple.main-thread ProcessGDBRemote::StopAsyncThread () + ProcessGDBRemote::AsyncThread (arg = 0x7fabc185e200, pid = 55239) Got an event of type: 2... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc185e200, pid = 55239) got eBroadcastBitAsyncThreadShouldExit... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc185e200, pid = 55239) thread exiting... +com.apple.root.default-priority ProcessGDBRemote::MonitorDebugserverProcess (baton=0x7fabc185e200, pid=55240, signo=2 (0x2), exit_status=-1) +com.apple.main-thread < 18> send packet: $z0,100000e37,1#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 21> send packet: $z0,7fff5fc0d6e5,1#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 21> send packet: $z0,7fff8b132187,1#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread ProcessGDBRemote::DoDestroy() +com.apple.main-thread < 5> send packet: $k#00 +com.apple.main-thread error: failed to get response for 'k' +com.apple.main-thread ProcessGDBRemote::DoDestroy - failed to send k packet +com.apple.main-thread ProcessGDBRemote::StopAsyncThread () +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc18f8600, pid = 55243) Got an event of type: 2... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc18f8600, pid = 55243) got eBroadcastBitAsyncThreadShouldExit... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc18f8600, pid = 55243) thread exiting... +com.apple.root.default-priority ProcessGDBRemote::MonitorDebugserverProcess (baton=0x7fabc18f8600, pid=55244, signo=2 (0x2), exit_status=-1) diff --git a/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt b/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt new file mode 100644 index 000000000000..87cfddb29329 --- /dev/null +++ b/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt @@ -0,0 +1,55 @@ +com.apple.main-thread /Volumes/data/lldb/svn/ToT/build/Debug/LLDB.framework/Versions/A/Resources/debugserver arguments: +argv[0]="/Volumes/data/lldb/svn/ToT/build/Debug/LLDB.framework/Versions/A/Resources/debugserver" +argv[1]="localhost:33231" +argv[2]="--native-regs" +argv[3]="--setsid" +argv[4]=NULL + + +com.apple.main-thread Host::LaunchProcess (launch_info) => pid=55287, path='/Volumes/data/lldb/svn/ToT/build/Debug/LLDB.framework/Versions/A/Resources/debugserver' err = 0x00000000 +com.apple.main-thread ProcessGDBRemote::StartAsyncThread () +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc0997600, pid = 0) thread starting... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc0997600, pid = 0) listener.WaitForEvent (NULL, event_sp)... +com.apple.main-thread < 1> send packet: + +com.apple.main-thread history[1] tid=0x1307 < 1> send packet: + +com.apple.main-thread < 19> send packet: $QStartNoAckMode#b0 +com.apple.main-thread < 1> read packet: + +com.apple.main-thread < 6> read packet: $OK#9a +com.apple.main-thread < 1> send packet: + +com.apple.main-thread < 26> send packet: $QThreadSuffixSupported#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 27> send packet: $QListThreadsInStopReply#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 13> send packet: $qHostInfo#00 +com.apple.main-thread < 122> read packet: $cputype:16777223;cpusubtype:3;ostype:macosx;watchpoint_exceptions_received:after;vendor:apple;endian:little;ptrsize:8;#00 +com.apple.main-thread < 10> send packet: $vCont?#00 +com.apple.main-thread < 17> read packet: $vCont;c;C;s;S#00 +com.apple.main-thread < 27> send packet: $qVAttachOrWaitSupported#00 +com.apple.main-thread < 6> read packet: $OK#00 + +... + +com.apple.main-thread ProcessGDBRemote::DoDestroy() +com.apple.main-thread < 5> send packet: $k#00 +com.apple.main-thread error: failed to get response for 'k' +com.apple.main-thread ProcessGDBRemote::DoDestroy - failed to send k packet +com.apple.main-thread ProcessGDBRemote::StopAsyncThread () +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc1882000, pid = 55289) Got an event of type: 2... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc1882000, pid = 55289) got eBroadcastBitAsyncThreadShouldExit... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc1882000, pid = 55289) thread exiting... +com.apple.root.default-priority ProcessGDBRemote::MonitorDebugserverProcess (baton=0x7fabc1882000, pid=55290, signo=2 (0x2), exit_status=-1) +com.apple.main-thread < 18> send packet: $z0,100000e37,1#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 21> send packet: $z0,7fff5fc0d6e5,1#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread < 21> send packet: $z0,7fff8b132187,1#00 +com.apple.main-thread < 6> read packet: $OK#00 +com.apple.main-thread ProcessGDBRemote::DoDestroy() +com.apple.main-thread < 5> send packet: $k#00 +com.apple.main-thread error: failed to get response for 'k' +com.apple.main-thread ProcessGDBRemote::DoDestroy - failed to send k packet +com.apple.main-thread ProcessGDBRemote::StopAsyncThread () +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc0bed200, pid = 55292) Got an event of type: 2... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc0bed200, pid = 55292) got eBroadcastBitAsyncThreadShouldExit... +<lldb.process.gdb-remote.async> ProcessGDBRemote::AsyncThread (arg = 0x7fabc0bed200, pid = 55292) thread exiting... +com.apple.root.default-priority ProcessGDBRemote::MonitorDebugserverProcess (baton=0x7fabc0bed200, pid=55293, signo=2 (0x2), exit_status=-1) diff --git a/examples/test/usage-config b/examples/test/usage-config new file mode 100644 index 000000000000..4f3d3b222f17 --- /dev/null +++ b/examples/test/usage-config @@ -0,0 +1,10 @@ +# This is an example of using the "-c" option to source a config file to +# reassign the system stderr and stdout and to exercise different combinations +# of architectures and compilers. +# +# The config file is checked in as .lldbtest-config and the redirected stderr +# and stdout are checked in as lldbtest-stderr and lldbtest-stdout, all in the +# the same directory as this file. + +[15:36:32] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v -c ~/.lldbtest-config persistent_variables +[15:40:55] johnny:/Volumes/data/lldb/svn/trunk/test $ diff --git a/examples/test/usage-lldb-loggings b/examples/test/usage-lldb-loggings new file mode 100644 index 000000000000..b7d7e2e58fc1 --- /dev/null +++ b/examples/test/usage-lldb-loggings @@ -0,0 +1,125 @@ +# +# The following example shows how to utilize the pre-flight config file to route the lldb gdb-remote log messages +# into individual log destinations. +# +# See also .lldb-loggings in this directory as well as the tmp dir which contains the two log files abridged due +# to their log sizes. +# + +[11:31:34] 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 0x107042140>} +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 + + dest = os.path.join("/tmp", "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-11_36_37' +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: /tmp/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: /tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt +ok + +---------------------------------------------------------------------- +Ran 2 tests in 7.826s + +OK +[11:36:44] johnny:/Volumes/data/lldb/svn/ToT/test $ ls -l /tmp/lldb_log* +-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 $ diff --git a/examples/test/usage-pre-post-flight b/examples/test/usage-pre-post-flight new file mode 100644 index 000000000000..da6860724258 --- /dev/null +++ b/examples/test/usage-pre-post-flight @@ -0,0 +1,65 @@ +# +# The following examples first show a bad pre/post flight config file followed by a good pre/post config file. +# + +[11:31:19] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight.bad functionalities/watchpoint/hello_watchpoint +config: {'pre_flight': 'I am not callable', 'post_flight': <function post_flight at 0x1071871b8>} +fatal error: pre_flight is not callable, exiting. +[11:32:48] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight functionalities/watchpoint/hello_watchpoint +config: {'pre_flight': <function pre_flight at 0x1098541b8>, 'post_flight': <function post_flight at 0x109854230>} +LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug +LLDB-139 +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: 154753 +Node Kind: directory +Schedule: normal +Last Changed Author: gclayton +Last Changed Rev: 154730 +Last Changed Date: 2012-04-13 18:42:46 -0700 (Fri, 13 Apr 2012) + + +lldb.pre_flight: def pre_flight(test): + __import__("lldb") + __import__("lldbtest") + print "\nRunning pre-flight function:" + print "for test case:", test + +lldb.post_flight: def post_flight(test): + __import__("lldb") + __import__("lldbtest") + print "\nRunning post-flight function:" + print "for test case:", test + + +Session logs for test failures/errors/unexpected successes will go into directory '2012-04-16-11_34_08' +Command invoked: python ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight functionalities/watchpoint/hello_watchpoint +compilers=['clang'] + +Configuration: arch=x86_64 compiler=clang +---------------------------------------------------------------------- +Collected 2 tests + +1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) + Test a simple sequence of watchpoint creation and watchpoint hit. ... +Running pre-flight function: +for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) + +Running post-flight function: +for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) +ok +2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) + Test a simple sequence of watchpoint creation and watchpoint hit. ... +Running pre-flight function: +for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) + +Running post-flight function: +for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) +ok + +---------------------------------------------------------------------- +Ran 2 tests in 1.584s + +OK
\ No newline at end of file |