summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-09-02 22:25:47 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-09-02 22:25:47 +0000
commit57b47384ccf13af16edfd641fd61bcd75bffd665 (patch)
treeafa6daf82b8280221388befbbe4263975646681a
parent3ca46b4275470aa9b6f2384c083315233c585c2f (diff)
downloadbcm5719-llvm-57b47384ccf13af16edfd641fd61bcd75bffd665.tar.gz
bcm5719-llvm-57b47384ccf13af16edfd641fd61bcd75bffd665.zip
Added comments regarding the two mechanisms of process cleanup to lldbtest.py.
Also changed the expected strings to be matched since "thread list" changed its output format. llvm-svn: 112880
-rw-r--r--lldb/test/dead-strip/TestDeadStrip.py4
-rw-r--r--lldb/test/function_types/TestFunctionTypes.py2
-rw-r--r--lldb/test/lldbtest.py28
3 files changed, 15 insertions, 19 deletions
diff --git a/lldb/test/dead-strip/TestDeadStrip.py b/lldb/test/dead-strip/TestDeadStrip.py
index 8357ff13743..de9c28ddf4b 100644
--- a/lldb/test/dead-strip/TestDeadStrip.py
+++ b/lldb/test/dead-strip/TestDeadStrip.py
@@ -45,7 +45,7 @@ class DeadStripTestCase(TestBase):
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['state is Stopped',
'main.c:20',
- 'where = a.out`f1',
+ 'a.out`f1',
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
@@ -58,7 +58,7 @@ class DeadStripTestCase(TestBase):
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['state is Stopped',
'main.c:40',
- 'where = a.out`f3',
+ 'a.out`f3',
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
diff --git a/lldb/test/function_types/TestFunctionTypes.py b/lldb/test/function_types/TestFunctionTypes.py
index 311338b69d0..90eb2bf7f19 100644
--- a/lldb/test/function_types/TestFunctionTypes.py
+++ b/lldb/test/function_types/TestFunctionTypes.py
@@ -39,7 +39,7 @@ class FunctionTypesTestCase(TestBase):
# Check that we do indeed stop on the string_not_empty function.
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['where = a.out`string_not_empty',
+ substrs = ['a.out`string_not_empty',
'main.c:12',
'stop reason = breakpoint'])
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index 616b33eabf1..0a4282a9284 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -25,9 +25,8 @@ Ran 1 test in 0.363s
OK
$ LLDB_COMMAND_TRACE=YES python array_types/TestArrayTypes.py
-LLDB_COMMAND_TRACE=YES python array_types/TestArrayTypes.py
-runCmd: file /Volumes/data/lldb/svn/trunk/test/array_types/a.out
-output: Current executable set to '/Volumes/data/lldb/svn/trunk/test/array_types/a.out' (x86_64).
+
+...
runCmd: breakpoint set -f main.c -l 42
output: Breakpoint created: 1: file ='main.c', line = 42, locations = 1
@@ -35,17 +34,9 @@ output: Breakpoint created: 1: file ='main.c', line = 42, locations = 1
runCmd: run
output: Launching '/Volumes/data/lldb/svn/trunk/test/array_types/a.out' (x86_64)
-runCmd: thread list
-output: Process 24987 state is Stopped
- thread #1: tid = 0x2e03, pc = 0x0000000100000df4, where = a.out`main + 612 at /Volumes/data/lldb/svn/trunk/test/array_types/main.c:45, stop reason = breakpoint 1.1, queue = com.apple.main-thread
-
-runCmd: breakpoint list
-output: Current breakpoints:
-1: file ='main.c', line = 42, locations = 1, resolved = 1
- 1.1: where = a.out`main + 612 at /Volumes/data/lldb/svn/trunk/test/array_types/main.c:45, address = 0x0000000100000df4, resolved, hit count = 1
-
+...
-runCmd: variable list strings
+runCmd: frame variable strings
output: (char *[4]) strings = {
(char *) strings[0] = 0x0000000100000f0c "Hello",
(char *) strings[1] = 0x0000000100000f12 "Hola",
@@ -53,7 +44,7 @@ output: (char *[4]) strings = {
(char *) strings[3] = 0x0000000100000f1f "Guten Tag"
}
-runCmd: variable list char_16
+runCmd: frame variable char_16
output: (char [16]) char_16 = {
(char) char_16[0] = 'H',
(char) char_16[1] = 'e',
@@ -73,7 +64,7 @@ output: (char [16]) char_16 = {
(char) char_16[15] = '\0'
}
-runCmd: variable list ushort_matrix
+runCmd: frame variable ushort_matrix
output: (unsigned short [2][3]) ushort_matrix = {
(unsigned short [3]) ushort_matrix[0] = {
(unsigned short) ushort_matrix[0][0] = 0x0001,
@@ -87,7 +78,7 @@ output: (unsigned short [2][3]) ushort_matrix = {
}
}
-runCmd: variable list long_6
+runCmd: frame variable long_6
output: (long [6]) long_6 = {
(long) long_6[0] = 1,
(long) long_6[1] = 2,
@@ -266,6 +257,9 @@ class TestBase(unittest2.TestCase):
mydir = None
# State pertaining to the inferior process, if any.
+ # This reflects inferior process started through the command interface with
+ # either the lldb "run" or "process launch" command.
+ # See also self.runCmd().
runStarted = False
# Maximum allowed attempts when launching the inferior process.
@@ -310,6 +304,8 @@ class TestBase(unittest2.TestCase):
self.dbg.SetAsync(False)
# There is no process associated with the debugger as yet.
+ # See also self.tearDown() where it checks whether self.process has a
+ # valid reference and calls self.process.Kill() to kill the process.
self.process = None
# Retrieve the associated command interpreter instance.
OpenPOWER on IntegriCloud