Author: zturner Date: Wed Jan 27 12:49:35 2016 New Revision: 258967 URL: http://llvm.org/viewvc/llvm-project?rev=258967&view=rev Log: Fix some python 3 incompatibilities that went in overnight.
* basestring is not a thing anymore. Must use `six.string_types`. * Must use from __future__ import print_function in every new test file. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py?rev=258967&r1=258966&r2=258967&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py Wed Jan 27 12:49:35 2016 @@ -2,6 +2,8 @@ Test specific to MIPS """ +from __future__ import print_function + import os, time import re import unittest2 @@ -45,7 +47,7 @@ class AvoidBreakpointInDelaySlotAPITestC """Iterate over instructions in function and place a breakpoint on delay slot instruction""" # Get the list of all instructions in the function insts = function.GetInstructions(target) - print insts + print(insts) i = 0 for inst in insts: if (inst.HasDelaySlot()): Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=258967&r1=258966&r2=258967&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Wed Jan 27 12:49:35 2016 @@ -646,7 +646,7 @@ def check_list_or_lambda(list_or_lambda, def matchArchitectures(archs, actual_arch): retype = type(re.compile('hello, world')) list_passes = isinstance(archs, list) and actual_arch in archs - basestring_passes = isinstance(archs, basestring) and actual_arch == archs + basestring_passes = isinstance(archs, six.string_types) and actual_arch == archs regex_passes = isinstance(archs, retype) and re.match(archs, actual_arch) return (list_passes or basestring_passes or regex_passes) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits