[Lldb-commits] [lldb] r178389 - Fixing Python commands test cases to work even after removing Printf
Enrico Granata
egranata at apple.com
Fri Mar 29 17:53:14 PDT 2013
Author: enrico
Date: Fri Mar 29 19:53:13 2013
New Revision: 178389
URL: http://llvm.org/viewvc/llvm-project?rev=178389&view=rev
Log:
Fixing Python commands test cases to work even after removing Printf
(and using the new syntax for printing :-)
Modified:
lldb/trunk/test/functionalities/command_script/import/bar/bar.py
lldb/trunk/test/functionalities/command_script/import/foo/bar/foobar.py
lldb/trunk/test/functionalities/command_script/import/foo/foo.py
lldb/trunk/test/functionalities/command_script/import/foo/foo2.py
lldb/trunk/test/functionalities/command_script/welcome.py
Modified: lldb/trunk/test/functionalities/command_script/import/bar/bar.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/import/bar/bar.py?rev=178389&r1=178388&r2=178389&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/import/bar/bar.py (original)
+++ lldb/trunk/test/functionalities/command_script/import/bar/bar.py Fri Mar 29 19:53:13 2013
@@ -1,6 +1,6 @@
def bar_function(debugger, args, result, dict):
global UtilityModule
- result.Printf(UtilityModule.barutil_function("bar told me " + args))
+ print >>result, (UtilityModule.barutil_function("bar told me " + args))
return None
def __lldb_init_module(debugger, session_dict):
Modified: lldb/trunk/test/functionalities/command_script/import/foo/bar/foobar.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/import/foo/bar/foobar.py?rev=178389&r1=178388&r2=178389&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/import/foo/bar/foobar.py (original)
+++ lldb/trunk/test/functionalities/command_script/import/foo/bar/foobar.py Fri Mar 29 19:53:13 2013
@@ -1,3 +1,3 @@
def foo_function(debugger, args, result, dict):
- result.Printf("foobar says " + args)
+ print >>result, ("foobar says " + args)
return None
Modified: lldb/trunk/test/functionalities/command_script/import/foo/foo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/import/foo/foo.py?rev=178389&r1=178388&r2=178389&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/import/foo/foo.py (original)
+++ lldb/trunk/test/functionalities/command_script/import/foo/foo.py Fri Mar 29 19:53:13 2013
@@ -1,3 +1,3 @@
def foo_function(debugger, args, result, dict):
- result.Printf("foo says " + args)
+ print >>result, ("foo says " + args)
return None
Modified: lldb/trunk/test/functionalities/command_script/import/foo/foo2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/import/foo/foo2.py?rev=178389&r1=178388&r2=178389&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/import/foo/foo2.py (original)
+++ lldb/trunk/test/functionalities/command_script/import/foo/foo2.py Fri Mar 29 19:53:13 2013
@@ -1,5 +1,5 @@
def foo2_function(debugger, args, result, dict):
- result.Printf("foo2 says " + args)
+ print >>result, ("foo2 says " + args)
return None
def __lldb_init_module(debugger, session_dict):
Modified: lldb/trunk/test/functionalities/command_script/welcome.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/welcome.py?rev=178389&r1=178388&r2=178389&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/welcome.py (original)
+++ lldb/trunk/test/functionalities/command_script/welcome.py Fri Mar 29 19:53:13 2013
@@ -5,13 +5,13 @@ def welcome_impl(debugger, args, result,
Just a docstring for welcome_impl
A command that says hello to LLDB users
"""
- result.Printf('Hello ' + args + ', welcome to LLDB');
+ print >>result, ('Hello ' + args + ', welcome to LLDB');
return None;
def target_name_impl(debugger, args, result, dict):
target = debugger.GetSelectedTarget()
file = target.GetExecutable()
- result.PutCString('Current target ' + file.GetFilename())
+ print >>result, ('Current target ' + file.GetFilename())
if args == 'fail':
return 'a test for error in command'
else:
@@ -19,17 +19,17 @@ def target_name_impl(debugger, args, res
def print_wait_impl(debugger, args, result, dict):
result.SetImmediateOutputFile(sys.stdout)
- result.PutCString('Trying to do long task..')
+ print >>result, ('Trying to do long task..')
import time
time.sleep(1)
- result.PutCString('Still doing long task..')
+ print >>result, ('Still doing long task..')
time.sleep(1)
- result.PutCString('Done; if you saw the delays I am doing OK')
+ print >>result, ('Done; if you saw the delays I am doing OK')
return None
def check_for_synchro(debugger, args, result, dict):
if debugger.GetAsync() == True:
- result.PutCString('I am running async')
+ print >>result, ('I am running async')
if debugger.GetAsync() == False:
- result.PutCString('I am running sync')
+ print >>result, ('I am running sync')
return None
More information about the lldb-commits
mailing list