summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/command_script
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-23 17:04:29 +0000
committerZachary Turner <zturner@google.com>2015-10-23 17:04:29 +0000
commit35d017f0fc38b53e31f1a44d07c3c142f5d3620b (patch)
tree9bb8d7e92d30ed6ea5387993d53a07e8f16a155c /lldb/test/functionalities/command_script
parentd43fe0bd39ab70b739123853ebd0c2991512b9d7 (diff)
downloadbcm5719-llvm-35d017f0fc38b53e31f1a44d07c3c142f5d3620b.tar.gz
bcm5719-llvm-35d017f0fc38b53e31f1a44d07c3c142f5d3620b.zip
Add from __future__ import print_function everywhere.
Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
Diffstat (limited to 'lldb/test/functionalities/command_script')
-rw-r--r--lldb/test/functionalities/command_script/TestCommandScript.py2
-rw-r--r--lldb/test/functionalities/command_script/import/TestImport.py2
-rw-r--r--lldb/test/functionalities/command_script/import/bar/bar.py4
-rw-r--r--lldb/test/functionalities/command_script/import/foo/bar/foobar.py4
-rw-r--r--lldb/test/functionalities/command_script/import/foo/foo.py4
-rw-r--r--lldb/test/functionalities/command_script/import/foo/foo2.py4
-rw-r--r--lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py2
-rw-r--r--lldb/test/functionalities/command_script/mysto.py6
-rw-r--r--lldb/test/functionalities/command_script/welcome.py17
9 files changed, 31 insertions, 14 deletions
diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py
index b8a891630c3..ba47ed8d959 100644
--- a/lldb/test/functionalities/command_script/TestCommandScript.py
+++ b/lldb/test/functionalities/command_script/TestCommandScript.py
@@ -2,6 +2,8 @@
Test lldb Python commands.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/functionalities/command_script/import/TestImport.py b/lldb/test/functionalities/command_script/import/TestImport.py
index f413bdc4baa..9a6937b99c3 100644
--- a/lldb/test/functionalities/command_script/import/TestImport.py
+++ b/lldb/test/functionalities/command_script/import/TestImport.py
@@ -1,5 +1,7 @@
"""Test custom import command to import files by path."""
+from __future__ import print_function
+
import lldb_shared
import os, sys, time
diff --git a/lldb/test/functionalities/command_script/import/bar/bar.py b/lldb/test/functionalities/command_script/import/bar/bar.py
index 28a4488fa70..bbc41f3b217 100644
--- a/lldb/test/functionalities/command_script/import/bar/bar.py
+++ b/lldb/test/functionalities/command_script/import/bar/bar.py
@@ -1,6 +1,8 @@
+from __future__ import print_function
+
def bar_function(debugger, args, result, dict):
global UtilityModule
- print >>result, (UtilityModule.barutil_function("bar told me " + args))
+ print(UtilityModule.barutil_function("bar told me " + args), file=result)
return None
def __lldb_init_module(debugger, session_dict):
diff --git a/lldb/test/functionalities/command_script/import/foo/bar/foobar.py b/lldb/test/functionalities/command_script/import/foo/bar/foobar.py
index 212fea3251b..659ded22c90 100644
--- a/lldb/test/functionalities/command_script/import/foo/bar/foobar.py
+++ b/lldb/test/functionalities/command_script/import/foo/bar/foobar.py
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
def foo_function(debugger, args, result, dict):
- print >>result, ("foobar says " + args)
+ print("foobar says " + args, file=result)
return None
diff --git a/lldb/test/functionalities/command_script/import/foo/foo.py b/lldb/test/functionalities/command_script/import/foo/foo.py
index f528e9846ad..51cc0c3bab1 100644
--- a/lldb/test/functionalities/command_script/import/foo/foo.py
+++ b/lldb/test/functionalities/command_script/import/foo/foo.py
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
def foo_function(debugger, args, result, dict):
- print >>result, ("foo says " + args)
+ print("foo says " + args, file=result)
return None
diff --git a/lldb/test/functionalities/command_script/import/foo/foo2.py b/lldb/test/functionalities/command_script/import/foo/foo2.py
index 44e39cbac52..6863454ca6e 100644
--- a/lldb/test/functionalities/command_script/import/foo/foo2.py
+++ b/lldb/test/functionalities/command_script/import/foo/foo2.py
@@ -1,5 +1,7 @@
+from __future__ import print_function
+
def foo2_function(debugger, args, result, dict):
- print >>result, ("foo2 says " + args)
+ print("foo2 says " + args, file=result)
return None
def __lldb_init_module(debugger, session_dict):
diff --git a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
index 4b19386379b..b5209d4a3a4 100644
--- a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
+++ b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
@@ -1,5 +1,7 @@
"""Check that we handle an ImportError in a special way when command script importing files."""
+from __future__ import print_function
+
import lldb_shared
import os, sys, time
diff --git a/lldb/test/functionalities/command_script/mysto.py b/lldb/test/functionalities/command_script/mysto.py
index 7191914731c..656cd150293 100644
--- a/lldb/test/functionalities/command_script/mysto.py
+++ b/lldb/test/functionalities/command_script/mysto.py
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
import lldb
import sys
import os
@@ -8,11 +10,11 @@ def StepOver(debugger, args, result, dict):
Step over a given number of times instead of only just once
"""
arg_split = args.split(" ")
- print type(arg_split)
+ print(type(arg_split))
count = int(arg_split[0])
for i in range(0,count):
debugger.GetSelectedTarget().GetProcess().GetSelectedThread().StepOver(lldb.eOnlyThisThread)
- print "step<%d>"%i
+ print("step<%d>"%i)
def __lldb_init_module(debugger, session_dict):
# by default, --synchronicity is set to synchronous
diff --git a/lldb/test/functionalities/command_script/welcome.py b/lldb/test/functionalities/command_script/welcome.py
index c6d4ddcfd40..5dbf09fbbec 100644
--- a/lldb/test/functionalities/command_script/welcome.py
+++ b/lldb/test/functionalities/command_script/welcome.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import lldb, sys
class WelcomeCommand(object):
@@ -8,7 +9,7 @@ class WelcomeCommand(object):
return "Just a docstring for welcome_impl\nA command that says hello to LLDB users"
def __call__(self, debugger, args, exe_ctx, result):
- print >>result, ('Hello ' + args + ', welcome to LLDB');
+ print('Hello ' + args + ', welcome to LLDB', file=result);
return None;
class TargetnameCommand(object):
@@ -18,7 +19,7 @@ class TargetnameCommand(object):
def __call__(self, debugger, args, exe_ctx, result):
target = debugger.GetSelectedTarget()
file = target.GetExecutable()
- print >>result, ('Current target ' + file.GetFilename())
+ print('Current target ' + file.GetFilename(), file=result)
if args == 'fail':
result.SetError('a test for error in command')
@@ -27,19 +28,19 @@ class TargetnameCommand(object):
def print_wait_impl(debugger, args, result, dict):
result.SetImmediateOutputFile(sys.stdout)
- print >>result, ('Trying to do long task..')
+ print('Trying to do long task..', file=result)
import time
time.sleep(1)
- print >>result, ('Still doing long task..')
+ print('Still doing long task..', file=result)
time.sleep(1)
- print >>result, ('Done; if you saw the delays I am doing OK')
+ print('Done; if you saw the delays I am doing OK', file=result)
def check_for_synchro(debugger, args, result, dict):
if debugger.GetAsync() == True:
- print >>result, ('I am running async')
+ print('I am running async', file=result)
if debugger.GetAsync() == False:
- print >>result, ('I am running sync')
+ print('I am running sync', file=result)
def takes_exe_ctx(debugger, args, exe_ctx, result, dict):
- print >>result, str(exe_ctx.GetTarget())
+ print(str(exe_ctx.GetTarget()), file=result)
OpenPOWER on IntegriCloud