From 90da3ccadb34df062fb520c832604b157231b8e0 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Tue, 19 Apr 2011 19:49:09 +0000 Subject: Use self.TraceOn() API. llvm-svn: 129792 --- lldb/test/python_api/process/TestProcessAPI.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lldb/test/python_api/process/TestProcessAPI.py') 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) -- cgit v1.2.3