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
diff --git a/lldb/test/lang/c/anonymous/TestAnonymous.py b/lldb/test/lang/c/anonymous/TestAnonymous.py
index 1899384..3f79233 100644
--- a/lldb/test/lang/c/anonymous/TestAnonymous.py
+++ b/lldb/test/lang/c/anonymous/TestAnonymous.py
@@ -1,5 +1,7 @@
"""Test that anonymous structs/unions are transparent to member access"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/array_types/TestArrayTypes.py b/lldb/test/lang/c/array_types/TestArrayTypes.py
index 98e839c..85b4ede 100644
--- a/lldb/test/lang/c/array_types/TestArrayTypes.py
+++ b/lldb/test/lang/c/array_types/TestArrayTypes.py
@@ -1,5 +1,7 @@
"""Test breakpoint by file/line number; and list variables with array types."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/bitfields/TestBitfields.py b/lldb/test/lang/c/bitfields/TestBitfields.py
index 024af2d..5f53437 100644
--- a/lldb/test/lang/c/bitfields/TestBitfields.py
+++ b/lldb/test/lang/c/bitfields/TestBitfields.py
@@ -1,5 +1,7 @@
"""Show bitfields and check that they display correctly."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/blocks/TestBlocks.py b/lldb/test/lang/c/blocks/TestBlocks.py
index 783401e..5ad48ec 100644
--- a/lldb/test/lang/c/blocks/TestBlocks.py
+++ b/lldb/test/lang/c/blocks/TestBlocks.py
@@ -1,5 +1,7 @@
"""Test that lldb can invoke blocks and access variables inside them"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/c/const_variables/TestConstVariables.py b/lldb/test/lang/c/const_variables/TestConstVariables.py
index 30fc91a..2f3a763 100644
--- a/lldb/test/lang/c/const_variables/TestConstVariables.py
+++ b/lldb/test/lang/c/const_variables/TestConstVariables.py
@@ -1,5 +1,7 @@
"""Check that compiler-generated constant values work correctly"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/enum_types/TestEnumTypes.py b/lldb/test/lang/c/enum_types/TestEnumTypes.py
index 6f1c52d..a8af960 100644
--- a/lldb/test/lang/c/enum_types/TestEnumTypes.py
+++ b/lldb/test/lang/c/enum_types/TestEnumTypes.py
@@ -1,5 +1,7 @@
"""Look up enum type information and check for correct display."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/forward/TestForwardDeclaration.py b/lldb/test/lang/c/forward/TestForwardDeclaration.py
index 6db0b30..430f20b 100644
--- a/lldb/test/lang/c/forward/TestForwardDeclaration.py
+++ b/lldb/test/lang/c/forward/TestForwardDeclaration.py
@@ -1,5 +1,7 @@
"""Test that forward declaration of a data structure gets resolved correctly."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/function_types/TestFunctionTypes.py b/lldb/test/lang/c/function_types/TestFunctionTypes.py
index fb46ea8..ab5d1bc 100644
--- a/lldb/test/lang/c/function_types/TestFunctionTypes.py
+++ b/lldb/test/lang/c/function_types/TestFunctionTypes.py
@@ -1,5 +1,7 @@
"""Test variable with function ptr type and that break on the function works."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/global_variables/TestGlobalVariables.py b/lldb/test/lang/c/global_variables/TestGlobalVariables.py
index 7d9c0dd..92f2526 100644
--- a/lldb/test/lang/c/global_variables/TestGlobalVariables.py
+++ b/lldb/test/lang/c/global_variables/TestGlobalVariables.py
@@ -1,5 +1,7 @@
"""Show global variables and check that they do indeed have global scopes."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/modules/TestCModules.py b/lldb/test/lang/c/modules/TestCModules.py
index 5875c77..c35a687 100644
--- a/lldb/test/lang/c/modules/TestCModules.py
+++ b/lldb/test/lang/c/modules/TestCModules.py
@@ -1,5 +1,7 @@
"""Test that importing modules in C works as expected."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/register_variables/TestRegisterVariables.py b/lldb/test/lang/c/register_variables/TestRegisterVariables.py
index a73bc26..343dcc8 100644
--- a/lldb/test/lang/c/register_variables/TestRegisterVariables.py
+++ b/lldb/test/lang/c/register_variables/TestRegisterVariables.py
@@ -1,5 +1,7 @@
"""Check that compiler-generated register values work correctly"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/set_values/TestSetValues.py b/lldb/test/lang/c/set_values/TestSetValues.py
index ae70f77..c568517 100644
--- a/lldb/test/lang/c/set_values/TestSetValues.py
+++ b/lldb/test/lang/c/set_values/TestSetValues.py
@@ -1,5 +1,7 @@
"""Test settings and readings of program variables."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/shared_lib/TestSharedLib.py b/lldb/test/lang/c/shared_lib/TestSharedLib.py
index dd09527..0d47806 100644
--- a/lldb/test/lang/c/shared_lib/TestSharedLib.py
+++ b/lldb/test/lang/c/shared_lib/TestSharedLib.py
@@ -1,5 +1,7 @@
"""Test that types defined in shared libraries work correctly."""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py b/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
index 611a361..e4dac28 100644
--- a/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
+++ b/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
@@ -1,5 +1,7 @@
"""Test that types defined in shared libraries with stripped symbols work correctly."""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
index ed50926..170a02b 100644
--- a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
+++ b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
@@ -1,5 +1,7 @@
"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/stepping/TestThreadStepping.py b/lldb/test/lang/c/stepping/TestThreadStepping.py
index e02551b..db8a726 100644
--- a/lldb/test/lang/c/stepping/TestThreadStepping.py
+++ b/lldb/test/lang/c/stepping/TestThreadStepping.py
@@ -2,6 +2,8 @@
Test thread stepping features in combination with frame select.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/c/tls_globals/TestTlsGlobals.py b/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
index 305ff39..0959154 100644
--- a/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
+++ b/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
@@ -1,5 +1,7 @@
"""Test that thread-local storage can be read correctly."""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/c/typedef/Testtypedef.py b/lldb/test/lang/c/typedef/Testtypedef.py
index 5c2882b..fc8a5a6 100644
--- a/lldb/test/lang/c/typedef/Testtypedef.py
+++ b/lldb/test/lang/c/typedef/Testtypedef.py
@@ -1,5 +1,7 @@
"""Look up type information for typedefs of same name at different lexical scope and check for correct display."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py b/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
index 867bfed..72c01ad 100644
--- a/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
+++ b/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
@@ -2,6 +2,8 @@
Test lldb breakpoint command for CPP methods & functions in a namespace.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
index 7392f79..0e55bab 100644
--- a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
+++ b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
@@ -3,6 +3,8 @@
Test that the C++11 support for char16_t and char32_t works correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/class_static/TestStaticVariables.py b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
index c9182fe..ba770af 100644
--- a/lldb/test/lang/cpp/class_static/TestStaticVariables.py
+++ b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
@@ -2,6 +2,8 @@
Test display and Python APIs on file and class static variables.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypes.py b/lldb/test/lang/cpp/class_types/TestClassTypes.py
index 6d737e0..9a46f5d 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypes.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypes.py
@@ -1,5 +1,7 @@
"""Test breakpoint on a class constructor; and variable list the this object."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
index 031c2b3..f9e0f5f 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
@@ -2,6 +2,8 @@
Test the lldb disassemble command on each call frame when stopped on C's ctor.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -30,8 +32,8 @@
match = frameRE.search(line)
if match:
function = match.group(1)
- #print "line:", line
- #print "function:", function
+ #print("line:", line)
+ #print("function:", function)
self.runCmd("disassemble -n '%s'" % function)
@python_api_test
@@ -51,8 +53,8 @@
function = frame.GetFunction()
# Print the function header.
if self.TraceOn():
- print
- print function
+ print()
+ print(function)
if function:
# Get all instructions for this function and print them out.
insts = function.GetInstructions(target)
@@ -61,7 +63,7 @@
# But we want to print to stdout only if self.TraceOn() is True.
disasm = str(inst)
if self.TraceOn():
- print disasm
+ print(disasm)
def setUp(self):
# Call super's setUp().
diff --git a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
index f46bad7..4d620a9 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
@@ -2,6 +2,8 @@
Test lldb Python API SBValue::Cast(SBType) for C++ types.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
@@ -81,8 +83,8 @@
if self.TraceOn():
for child in tellerA:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
# Call SBValue.Cast() to obtain instanceA.
instanceA = tellerA.Cast(typeA.GetPointerType())
@@ -91,8 +93,8 @@
# Iterate through all the children and print their values.
if self.TraceOn():
for child in instanceA:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
a_member_val = instanceA.GetChildMemberWithName('m_a_val')
self.DebugSBValue(a_member_val)
self.assertTrue(a_member_val.GetValueAsUnsigned(error, 0) == 10)
@@ -109,8 +111,8 @@
if self.TraceOn():
for child in tellerB:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
# Call SBValue.Cast() to obtain instanceB.
instanceB = tellerB.Cast(typeB.GetPointerType())
@@ -119,8 +121,8 @@
# Iterate through all the children and print their values.
if self.TraceOn():
for child in instanceB:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
b_member_val = instanceB.GetChildMemberWithName('m_b_val')
self.DebugSBValue(b_member_val)
self.assertTrue(b_member_val.GetValueAsUnsigned(error, 0) == 36)
diff --git a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
index 3ef4193..7095e42 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -2,6 +2,8 @@
Use lldb Python API to test dynamic values in C++
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
index c0fb310..a31519f 100644
--- a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
+++ b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
@@ -1,5 +1,7 @@
"""Look up enum type information and check for correct display."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
index 51135c7..babe4f2 100644
--- a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
+++ b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
@@ -2,6 +2,8 @@
Test lldb exception breakpoint command for CPP.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/namespace/TestNamespace.py b/lldb/test/lang/cpp/namespace/TestNamespace.py
index 08825c4..40f1298 100644
--- a/lldb/test/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/lang/cpp/namespace/TestNamespace.py
@@ -2,6 +2,8 @@
Test the printing of anonymous and named namespace variables.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
index 4ac48e1..df1b5ac 100644
--- a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
+++ b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
@@ -3,6 +3,8 @@
Test that the expression parser returns proper Unicode strings.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
index 8ae2e22..5bac76e 100644
--- a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
+++ b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -2,6 +2,8 @@
Test that variables with signed types display correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
index f221a1a..aaf16d3 100644
--- a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
+++ b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
@@ -2,6 +2,8 @@
Tests that C++ member and static variables have correct layout and scope.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/cpp/stl/TestSTL.py b/lldb/test/lang/cpp/stl/TestSTL.py
index e326526..66a8dce 100644
--- a/lldb/test/lang/cpp/stl/TestSTL.py
+++ b/lldb/test/lang/cpp/stl/TestSTL.py
@@ -2,6 +2,8 @@
Test some expressions involving STL data types.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
index dad5bf2..1ffb765 100644
--- a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
+++ b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
@@ -2,6 +2,8 @@
Test the lldb disassemble command on lib stdc++.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
@@ -96,9 +98,9 @@
if match:
LA = match.group(1)
if self.TraceOn():
- print "line:", line
- print "load address:", LA
- print "SA:", SA
+ print("line:", line)
+ print("load address:", LA)
+ print("SA:", SA)
if SA and LA:
if int(LA, 16) > int(SA, 16):
self.runCmd("disassemble -s %s -e %s" % (SA, LA))
diff --git a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
index a1c9f25..9ac570e 100644
--- a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
+++ b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
@@ -2,6 +2,8 @@
Test that template instaniations of std::vector<long> and <short> in the same module have the correct types.
"""
+from __future__ import print_function
+
import lldb_shared
import lldb
diff --git a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
index a2c8ff7..9154cc6 100644
--- a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
+++ b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
@@ -2,6 +2,8 @@
Test that variables with unsigned types display correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/virtual/TestVirtual.py b/lldb/test/lang/cpp/virtual/TestVirtual.py
index 0904cfc..6863c07 100644
--- a/lldb/test/lang/cpp/virtual/TestVirtual.py
+++ b/lldb/test/lang/cpp/virtual/TestVirtual.py
@@ -2,6 +2,8 @@
Test C++ virtual function and virtual inheritance.
"""
+from __future__ import print_function
+
import os, time
import re
import lldb
@@ -71,7 +73,7 @@
if match:
my_expr, val = match.group(1), match.group(2)
gl.append((my_expr, val))
- #print "golden list:", gl
+ #print("golden list:", gl)
# Now iterate through the golden list, comparing against the output from
# 'expression var'.
diff --git a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
index d2b3ab9..70cc028 100644
--- a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
+++ b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
@@ -3,6 +3,8 @@
Test that C++ supports wchar_t correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/go/goroutines/TestGoroutines.py b/lldb/test/lang/go/goroutines/TestGoroutines.py
index 6c26a3a..a5726c4 100644
--- a/lldb/test/lang/go/goroutines/TestGoroutines.py
+++ b/lldb/test/lang/go/goroutines/TestGoroutines.py
@@ -1,5 +1,7 @@
"""Test the Go OS Plugin."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/go/types/TestGoASTContext.py b/lldb/test/lang/go/types/TestGoASTContext.py
index 457b6d3..2f52563 100644
--- a/lldb/test/lang/go/types/TestGoASTContext.py
+++ b/lldb/test/lang/go/types/TestGoASTContext.py
@@ -1,5 +1,7 @@
"""Test the go DWARF type parsing."""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -103,8 +105,8 @@
self.assertEqual(1, v.GetNumChildren())
self.assertEqual('-10', v.GetChildAtIndex(0).value)
- # print
- # print os.getpid()
+ # print()
+ # print(os.getpid())
# time.sleep(60)
v = self.var('theStruct')
if v.TypeIsPointerType():
diff --git a/lldb/test/lang/mixed/TestMixedLanguages.py b/lldb/test/lang/mixed/TestMixedLanguages.py
index 1fbf118..e791686 100644
--- a/lldb/test/lang/mixed/TestMixedLanguages.py
+++ b/lldb/test/lang/mixed/TestMixedLanguages.py
@@ -1,5 +1,7 @@
"""Test that lldb works correctly on compile units form different languages."""
+from __future__ import print_function
+
import lldb_shared
import os, time, re
diff --git a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
index a629dcf..5e9d55a 100644
--- a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
+++ b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
@@ -1,5 +1,7 @@
"""Test printing ivars and ObjC objects captured in blocks that are made in methods of an ObjC class."""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -97,5 +99,5 @@
self.assertTrue (expr, "Successfully got a local variable in a block in a class method.")
ret_value_signed = expr.GetValueAsSigned (error)
- # print 'ret_value_signed = %i' % (ret_value_signed)
+ # print('ret_value_signed = %i' % (ret_value_signed))
self.assertTrue (ret_value_signed == 5, "The local variable in the block was what we expected.")
diff --git a/lldb/test/lang/objc/forward-decl/TestForwardDecl.py b/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
index 6c2f109..49c2995 100644
--- a/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
+++ b/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
@@ -1,5 +1,7 @@
"""Test that a forward-declared class works when its complete definition is in a library"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/foundation/TestConstStrings.py b/lldb/test/lang/objc/foundation/TestConstStrings.py
index 772f5d7..11726c9 100644
--- a/lldb/test/lang/objc/foundation/TestConstStrings.py
+++ b/lldb/test/lang/objc/foundation/TestConstStrings.py
@@ -3,6 +3,8 @@
parser.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
index cd03e76..6488b98 100644
--- a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
+++ b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
@@ -2,6 +2,8 @@
Test the lldb disassemble command on foundation framework.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
@@ -35,7 +37,7 @@
foundation_framework = None
for module in target.modules:
- print module
+ print(module)
if module.file.basename == "Foundation":
foundation_framework = module.file.fullpath
break
@@ -58,8 +60,8 @@
match = codeRE.search(line)
if match:
func = match.group(1)
- #print "line:", line
- #print "func:", func
+ #print("line:", line)
+ #print("func:", func)
self.runCmd('disassemble -n "%s"' % func)
@@ -71,9 +73,9 @@
target = self.dbg.CreateTarget("a.out")
self.assertTrue(target, VALID_TARGET)
- print target
+ print(target)
for module in target.modules:
- print module
+ print(module)
# Stop at +[NSString stringWithFormat:].
symbol_name = "+[NSString stringWithFormat:]"
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods.py b/lldb/test/lang/objc/foundation/TestObjCMethods.py
index 1417d01..ee5fab5 100644
--- a/lldb/test/lang/objc/foundation/TestObjCMethods.py
+++ b/lldb/test/lang/objc/foundation/TestObjCMethods.py
@@ -3,6 +3,8 @@
Also lookup objective-c data types and evaluate expressions.
"""
+from __future__ import print_function
+
import lldb_shared
import os, os.path, time
@@ -253,8 +255,8 @@
for line in lines:
if string.find(line, "$__lldb") != -1:
if num_errors == 0:
- print "error: found spurious name lookups when evaluating an expression:"
+ print("error: found spurious name lookups when evaluating an expression:")
num_errors += 1
- print line,
+ print(line, end='')
self.assertTrue(num_errors == 0, "Spurious lookups detected")
f.close()
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods2.py b/lldb/test/lang/objc/foundation/TestObjCMethods2.py
index 9c6ce04..ccc93ca 100644
--- a/lldb/test/lang/objc/foundation/TestObjCMethods2.py
+++ b/lldb/test/lang/objc/foundation/TestObjCMethods2.py
@@ -2,6 +2,8 @@
Test more expression command sequences with objective-c.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
index 6dd9b90..f0b1d0d 100644
--- a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
+++ b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
@@ -2,6 +2,8 @@
Test SBValue.GetObjectDescription() with the value from SBTarget.FindGlobalVariables().
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -52,8 +54,8 @@
for v in value_list1:
self.DebugSBValue(v)
if self.TraceOn():
- print "val:", v
- print "object description:", v.GetObjectDescription()
+ print("val:", v)
+ print("object description:", v.GetObjectDescription())
if v.GetName() == 'my_global_str':
self.assertTrue(v.GetObjectDescription() == 'This is a global string')
@@ -62,7 +64,7 @@
for v in value_list2:
self.DebugSBValue(v)
if self.TraceOn():
- print "val:", v
- print "object description:", v.GetObjectDescription()
+ print("val:", v)
+ print("object description:", v.GetObjectDescription())
if v.GetName() == 'my_global_str':
self.assertTrue(v.GetObjectDescription() == 'This is a global string')
diff --git a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
index a302fcc..357346b 100644
--- a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
+++ b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
@@ -2,6 +2,8 @@
Test that Objective-C methods from the runtime work correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/foundation/TestSymbolTable.py b/lldb/test/lang/objc/foundation/TestSymbolTable.py
index 3b1d820..378147e 100644
--- a/lldb/test/lang/objc/foundation/TestSymbolTable.py
+++ b/lldb/test/lang/objc/foundation/TestSymbolTable.py
@@ -2,6 +2,8 @@
Test symbol table access for main.m.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -53,14 +55,14 @@
expected_symbols = set(self.symbols_list)
for symbol in module:
self.assertTrue(symbol, VALID_SYMBOL)
- #print "symbol:", symbol
+ #print("symbol:", symbol)
name = symbol.GetName()
if name in expected_symbols:
- #print "Removing %s from known_symbols %s" % (name, expected_symbols)
+ #print("Removing %s from known_symbols %s" % (name, expected_symbols))
expected_symbols.remove(name)
# At this point, the known_symbols set should have become an empty set.
# If not, raise an error.
- #print "symbols unaccounted for:", expected_symbols
+ #print("symbols unaccounted for:", expected_symbols)
self.assertTrue(len(expected_symbols) == 0,
"All the known symbols are accounted for")
diff --git a/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py b/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
index a36ba61..5b06ea2 100644
--- a/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
+++ b/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
@@ -1,5 +1,7 @@
"""Test that hidden ivars in a shared library are visible from the main executable."""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py b/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
index 2ccd8bc..a0c208b 100644
--- a/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
+++ b/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
@@ -2,6 +2,8 @@
Test that dynamically discovered ivars of type IMP do not crash LLDB
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -11,11 +13,11 @@
import commands
def execute_command (command):
- # print '%% %s' % (command)
+ # print('%% %s' % (command))
(exit_status, output) = commands.getstatusoutput (command)
# if output:
- # print output
- # print 'status = %u' % (exit_status)
+ # print(output)
+ # print('status = %u' % (exit_status))
return exit_status
class ObjCiVarIMPTestCase(TestBase):
diff --git a/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py b/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
index a836cda..c00d0d1 100644
--- a/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
+++ b/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
@@ -1,5 +1,7 @@
"""Test that importing modules in Objective-C works as expected."""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py b/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py
index 0db2a11..12d4e37 100644
--- a/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py
+++ b/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py
@@ -1,5 +1,7 @@
"""Test that DWARF types are trusted over module types"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py b/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
index b322cf0..22d0909 100644
--- a/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
+++ b/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
@@ -1,5 +1,7 @@
"""Test that inline functions from modules are imported correctly"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/objc/modules/TestObjCModules.py b/lldb/test/lang/objc/modules/TestObjCModules.py
index aa3351a..f8ed11a 100644
--- a/lldb/test/lang/objc/modules/TestObjCModules.py
+++ b/lldb/test/lang/objc/modules/TestObjCModules.py
@@ -1,5 +1,7 @@
"""Test that importing modules in Objective-C works as expected."""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/objc/objc++/TestObjCXX.py b/lldb/test/lang/objc/objc++/TestObjCXX.py
index 2c5b320..b553035 100644
--- a/lldb/test/lang/objc/objc++/TestObjCXX.py
+++ b/lldb/test/lang/objc/objc++/TestObjCXX.py
@@ -2,6 +2,8 @@
Make sure that ivars of Objective-C++ classes are visible in LLDB.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
index da4b146..d7cdda1 100644
--- a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
+++ b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
@@ -2,6 +2,8 @@
Use lldb Python API to test base class resolution for ObjC classes
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
index eeedc9b..95a54144 100644
--- a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
+++ b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
@@ -1,5 +1,7 @@
"""Test that the expression parser doesn't get confused by 'id' and 'Class'"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
index 15820b6..b3c4443 100644
--- a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
+++ b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
@@ -2,6 +2,8 @@
Use lldb Python API to make sure the dynamic checkers are doing their jobs.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
index 70cb513..a22a2c0 100644
--- a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
+++ b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
@@ -1,5 +1,7 @@
"""Test calling functions in class methods."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py b/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
index 9e4a7e2..f6a7b74 100644
--- a/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
+++ b/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
@@ -2,6 +2,8 @@
Test that we are able to properly report a usable dynamic type
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
index bd0bbea..7c2b7dc 100644
--- a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
+++ b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
@@ -2,6 +2,8 @@
Use lldb Python API to test dynamic values in ObjC
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
index 26e09da..c53d84c 100644
--- a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
+++ b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
@@ -1,5 +1,7 @@
"""Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
index dd4620f..de529e8 100644
--- a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
+++ b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
@@ -1,5 +1,7 @@
"""Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
index 66dc4d5..afdbc61 100644
--- a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
+++ b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
@@ -1,5 +1,7 @@
"""Test that the Objective-C syntax for dictionary/array literals and indexing works"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py b/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
index a2769e2..28712b9 100644
--- a/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
+++ b/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
@@ -7,6 +7,8 @@
optimized it into a register.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-property/TestObjCProperty.py b/lldb/test/lang/objc/objc-property/TestObjCProperty.py
index f21ab34..0806776 100644
--- a/lldb/test/lang/objc/objc-property/TestObjCProperty.py
+++ b/lldb/test/lang/objc/objc-property/TestObjCProperty.py
@@ -2,6 +2,8 @@
Use lldb Python API to verify that expression evaluation for property references uses the correct getters and setters
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
index a071987..6d230f2 100644
--- a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
+++ b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
@@ -1,5 +1,7 @@
"""Test calling functions in static methods with a stripped binary."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
index 443c4c5..290d29e 100644
--- a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
+++ b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
@@ -1,5 +1,7 @@
"""Test calling functions in static methods."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
index 015992c..2f51a9a 100644
--- a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
+++ b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
@@ -1,5 +1,7 @@
"""Test stepping through ObjC method dispatch in various forms."""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -85,7 +87,7 @@
className = mySource_isa.GetSummary ()
if self.TraceOn():
- print mySource_isa
+ print(mySource_isa)
# Lets delete mySource so we can check that after stepping a child variable
# with no parent persists and is useful.
@@ -127,7 +129,7 @@
newClassName = mySource_isa.GetSummary ()
if self.TraceOn():
- print mySource_isa
+ print(mySource_isa)
self.assertTrue (newClassName != className, "The isa did indeed change, swizzled!")
diff --git a/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
index be6e87b..1b4388f 100644
--- a/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
+++ b/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
@@ -1,5 +1,7 @@
"""Test passing structs to Objective-C methods."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
index d6fafd7..6045568 100644
--- a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
+++ b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
@@ -1,5 +1,7 @@
"""Test calling functions in class methods."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/objc-super/TestObjCSuper.py b/lldb/test/lang/objc/objc-super/TestObjCSuper.py
index 4aba9e9..051cb25 100644
--- a/lldb/test/lang/objc/objc-super/TestObjCSuper.py
+++ b/lldb/test/lang/objc/objc-super/TestObjCSuper.py
@@ -1,5 +1,7 @@
"""Test calling methods on super."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/print-obj/TestPrintObj.py b/lldb/test/lang/objc/print-obj/TestPrintObj.py
index b1205cf..440f0c4 100644
--- a/lldb/test/lang/objc/print-obj/TestPrintObj.py
+++ b/lldb/test/lang/objc/print-obj/TestPrintObj.py
@@ -2,6 +2,8 @@
Test "print object" where another thread blocks the print object from making progress.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -65,7 +67,7 @@
self.assertTrue(other_thread)
process.SetSelectedThread(other_thread)
if self.TraceOn():
- print "selected thread:" + lldbutil.get_description(other_thread)
+ print("selected thread:" + lldbutil.get_description(other_thread))
self.runCmd("thread backtrace")
# We want to traverse the frame to the one corresponding to blocked.m to
@@ -78,7 +80,7 @@
if name == 'main':
other_thread.SetSelectedFrame(i)
if self.TraceOn():
- print "selected frame:" + lldbutil.get_description(frame)
+ print("selected frame:" + lldbutil.get_description(frame))
break
self.expect("po lock_me", OBJECT_PRINTED_CORRECTLY,
diff --git a/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
index 726ec82..dd8e967 100644
--- a/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
+++ b/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
@@ -2,6 +2,8 @@
Test that objective-c method returning BOOL works correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py b/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
index be9b6cf..1b087c6 100644
--- a/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
+++ b/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
@@ -2,6 +2,8 @@
Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py b/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
index 3523695..b36b82f 100644
--- a/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
+++ b/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
@@ -2,6 +2,8 @@
Test that we do not attempt to make a dynamic type for a 'const char*'
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py b/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
index 54fa80c..81ec1a8 100644
--- a/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
+++ b/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
@@ -2,6 +2,8 @@
Test that we are able to find out how many children NSWindow has
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/objc/real-definition/TestRealDefinition.py b/lldb/test/lang/objc/real-definition/TestRealDefinition.py
index 04e4986..8a87e09 100644
--- a/lldb/test/lang/objc/real-definition/TestRealDefinition.py
+++ b/lldb/test/lang/objc/real-definition/TestRealDefinition.py
@@ -1,5 +1,7 @@
"""Test that types defined in shared libraries work correctly."""
+from __future__ import print_function
+
import lldb_shared
import os, time