diff options
author | Zachary Turner <zturner@google.com> | 2016-01-27 18:49:35 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-01-27 18:49:35 +0000 |
commit | e89a66bd4a30a9c421405f56aa93ce6818fdddc7 (patch) | |
tree | 0d1f6d03ce97956471d4b0adf098e6cc26858928 | |
parent | 7289e43831d55be74a2814f2bd83789e5f390a76 (diff) | |
download | bcm5719-llvm-e89a66bd4a30a9c421405f56aa93ce6818fdddc7.tar.gz bcm5719-llvm-e89a66bd4a30a9c421405f56aa93ce6818fdddc7.zip |
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.
llvm-svn: 258967
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py | 4 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py index bab56e21040..324401ff44e 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py @@ -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 AvoidBreakpointInDelaySlotAPITestCase(TestBase): """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()): diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 0baad8aa7fd..61355a86129 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -646,7 +646,7 @@ def check_list_or_lambda(list_or_lambda, value): 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) |