diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-04-19 19:49:09 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-04-19 19:49:09 +0000 |
commit | 90da3ccadb34df062fb520c832604b157231b8e0 (patch) | |
tree | d2f2e3218ef851724bc808333e1984d1236de4ce /lldb/test/python_api/process/TestProcessAPI.py | |
parent | 9efcb0ec4d19a655a2698a83f5c70f7b622d655a (diff) | |
download | bcm5719-llvm-90da3ccadb34df062fb520c832604b157231b8e0.tar.gz bcm5719-llvm-90da3ccadb34df062fb520c832604b157231b8e0.zip |
Use self.TraceOn() API.
llvm-svn: 129792
Diffstat (limited to 'lldb/test/python_api/process/TestProcessAPI.py')
-rw-r--r-- | lldb/test/python_api/process/TestProcessAPI.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lldb/test/python_api/process/TestProcessAPI.py b/lldb/test/python_api/process/TestProcessAPI.py index 02dff3c0078..6b227b1ae47 100644 --- a/lldb/test/python_api/process/TestProcessAPI.py +++ b/lldb/test/python_api/process/TestProcessAPI.py @@ -98,7 +98,8 @@ class ProcessAPITestCase(TestBase): content = self.process.ReadMemory(location, 1, error) if not error.Success(): self.fail("SBProcess.ReadMemory() failed") - print "memory content:", content + if self.TraceOn(): + print "memory content:", content self.expect(content, "Result from SBProcess.ReadMemory() matches our expected output: 'x'", exe=False, @@ -148,7 +149,8 @@ class ProcessAPITestCase(TestBase): content = self.process.ReadMemory(location, 1, error) if not error.Success(): self.fail("SBProcess.ReadMemory() failed") - print "memory content:", content + if self.TraceOn(): + print "memory content:", content self.expect(content, "Result from SBProcess.ReadMemory() matches our expected output: 'a'", exe=False, @@ -239,8 +241,9 @@ class ProcessAPITestCase(TestBase): self.fail("Memory content read from 'my_int' does not match (int)256") # Dump the memory content.... - for i in new_bytes: - print "byte:", i + if self.TraceOn(): + for i in new_bytes: + print "byte:", i def remote_launch_should_fail(self): """Test SBProcess.RemoteLaunch() API with a process not in eStateConnected, and it should fail.""" @@ -254,7 +257,8 @@ class ProcessAPITestCase(TestBase): error = lldb.SBError() process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) - print "process state:", StateTypeString(process.GetState()) + if self.TraceOn(): + print "process state:", StateTypeString(process.GetState()) self.assertTrue(process.GetState() != lldb.eStateConnected) success = process.RemoteLaunch(None, None, None, None, None, None, 0, False, error) |