diff options
author | Zachary Turner <zturner@google.com> | 2015-11-03 02:06:18 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-11-03 02:06:18 +0000 |
commit | 95c453a221d5e757830145c2d5198c3a9da3f4b2 (patch) | |
tree | aa824a74049518ed35ff67e2182f2dfcceac0658 /lldb/packages/Python/lldbsuite/test/python_api | |
parent | 6f4ed269b9f4d8296f2002f5d96fcc5d8a9ef7b1 (diff) | |
download | bcm5719-llvm-95c453a221d5e757830145c2d5198c3a9da3f4b2.tar.gz bcm5719-llvm-95c453a221d5e757830145c2d5198c3a9da3f4b2.zip |
Tighten up sys.path, and use absolute imports everywhere.
For convenience, we had added the folder that dotest.py was in
to sys.path, so that we could easily write things like
`import lldbutil` from anywhere and any test. This introduces
a subtle problem when using Python's package system, because when
unittest2 imports a particular test suite, the test suite is detached
from the package. Thus, writing "import lldbutil" from dotest imports
it as part of the package, and writing the same line from a test
does a fresh import since the importing module was not part of
the same package.
The real way to fix this is to use absolute imports everywhere. Instead
of writing "import lldbutil", we need to write "import
lldbsuite.test.util". This patch fixes up that and all other similar
cases, and additionally removes the script directory from sys.path
to ensure that this can't happen again.
llvm-svn: 251886
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
45 files changed, 118 insertions, 96 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py index c70b485a93a..681f22c6032 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class BreakpointAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py b/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py index 00b2bcfe0db..dc60abfa6d0 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class SBTypeMemberFunctionsTest(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py index 40719777bbe..98feda859ae 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py @@ -4,7 +4,7 @@ Test Debugger APIs. import os import lldb -from lldbtest import * +from lldbsuite.test.lldbtest import * class DebuggerAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py index 067d3875cea..14f69bd4e66 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py @@ -17,8 +17,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class APIDefaultConstructorTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py b/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py index 131146b83b5..63271da276f 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class DisassembleRawDataTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py b/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py index 310d308c70f..a20e75794dc 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class Disassemble_VST1_64(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py b/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py index 6f820f8e554..05cc38bcd58 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class EventAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/TestExprPathSynthetic.py b/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/TestExprPathSynthetic.py index 356979f0248..80305e303d0 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/TestExprPathSynthetic.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/TestExprPathSynthetic.py @@ -1,4 +1,4 @@ -import lldbinline -import lldbtest +import lldbsuite.test.lldbinline as lldbinline +import lldbsuite.test.lldbtest as lldbtest lldbinline.MakeInlineTest(__file__, globals(), [lldbtest.skipIfFreeBSD,lldbtest.skipIfLinux,lldbtest.skipIfWindows]) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py b/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py index 0bc525753fd..c6a669ba861 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py @@ -6,8 +6,8 @@ import use_lldb_suite import os, sys, time import lldb -from lldbtest import * -import lldbutil +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil class SBFrameFindValueTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py index 9c838503802..6fd5d8842f4 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py @@ -6,8 +6,8 @@ import use_lldb_suite import os, sys, time import lldb -from lldbtest import * -import lldbutil +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil class SBFormattersAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py b/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py index 8cc89f67724..ba0ffabac78 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py @@ -9,8 +9,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class FrameAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py b/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py index 314cc72cf28..22128823764 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class InlinedFrameAPITestCase(TestBase): @@ -47,7 +48,7 @@ class InlinedFrameAPITestCase(TestBase): self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) - import lldbutil + import lldbsuite.test.lldbutil as lldbutil stack_traces1 = lldbutil.print_stacktraces(process, string_buffer=True) if self.TraceOn(): print("Full stack traces when first stopped on the breakpoint 'inner_inline':") diff --git a/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py index a967dc85296..941558d8400 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class DisasmAPITestCase(TestBase): @@ -103,7 +104,7 @@ class DisasmAPITestCase(TestBase): self.assertTrue(sa1 and sa2 and sa1 == sa2, "The two starting addresses should be the same") - from lldbutil import get_description + from lldbsuite.test.lldbutil import get_description desc1 = get_description(sa1) desc2 = get_description(sa2) self.assertTrue(desc1 and desc2 and desc1 == desc2, diff --git a/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py index 1b49ebc2f15..c47ce32d689 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class SymbolAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py index 8c3e97f5b7e..f177315c1ad 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py @@ -7,7 +7,7 @@ import use_lldb_suite import os, sys, time import lldb import time -from lldbtest import * +from lldbsuite.test.lldbtest import * class HelloWorldTestCase(TestBase): @@ -65,7 +65,7 @@ class HelloWorldTestCase(TestBase): thread = process.GetThreadAtIndex(0) if thread.GetStopReason() != lldb.eStopReasonBreakpoint: - from lldbutil import stop_reason_to_str + from lldbsuite.test.lldbutil import stop_reason_to_str self.fail(STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS % stop_reason_to_str(thread.GetStopReason())) @@ -95,7 +95,7 @@ class HelloWorldTestCase(TestBase): self.assertTrue(error.Success() and process, PROCESS_IS_VALID) # Let's check the stack traces of the attached process. - import lldbutil + import lldbsuite.test.lldbutil as lldbutil stacktraces = lldbutil.print_stacktraces(process, string_buffer=True) self.expect(stacktraces, exe=False, substrs = ['main.c:%d' % self.line2, @@ -137,7 +137,7 @@ class HelloWorldTestCase(TestBase): startstr = name) # Let's check the stack traces of the attached process. - import lldbutil + import lldbsuite.test.lldbutil as lldbutil stacktraces = lldbutil.print_stacktraces(process, string_buffer=True) self.expect(stacktraces, exe=False, substrs = ['main.c:%d' % self.line2, diff --git a/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py index e5725674f86..298584fe495 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py @@ -6,7 +6,7 @@ import use_lldb_suite import os import lldb -from lldbtest import * +from lldbsuite.test.lldbtest import * class CommandInterpreterAPICase(TestBase): @@ -63,7 +63,7 @@ class CommandInterpreterAPICase(TestBase): process = ci.GetProcess() self.assertTrue(process) - import lldbutil + import lldbsuite.test.lldbutil as lldbutil if process.GetState() != lldb.eStateStopped: self.fail("Process should be in the 'stopped' state, " "instead the actual state is: '%s'" % diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py index 831c68a2f77..5128ac9850f 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py @@ -8,7 +8,7 @@ import use_lldb_suite import os import lldb -from lldbtest import * +from lldbsuite.test.lldbtest import * class FrameUtilsTestCase(TestBase): @@ -41,7 +41,7 @@ class FrameUtilsTestCase(TestBase): self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) - import lldbutil + import lldbsuite.test.lldbutil as lldbutil thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue (thread) frame0 = thread.GetFrameAtIndex(0) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py index d8842546268..0c16bf69534 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py @@ -9,7 +9,7 @@ import use_lldb_suite import os, time import re import lldb -from lldbtest import * +from lldbsuite.test.lldbtest import * class LLDBIteratorTestCase(TestBase): @@ -40,7 +40,7 @@ class LLDBIteratorTestCase(TestBase): if not process: self.fail("SBTarget.LaunchProcess() failed") - from lldbutil import get_description + from lldbsuite.test.lldbutil import get_description yours = [] for i in range(target.GetNumModules()): yours.append(target.GetModuleAtIndex(i)) @@ -72,7 +72,7 @@ class LLDBIteratorTestCase(TestBase): self.assertTrue(target.GetNumBreakpoints() == 2) - from lldbutil import get_description + from lldbsuite.test.lldbutil import get_description yours = [] for i in range(target.GetNumBreakpoints()): yours.append(target.GetBreakpointAtIndex(i)) @@ -106,7 +106,7 @@ class LLDBIteratorTestCase(TestBase): if not process: self.fail("SBTarget.LaunchProcess() failed") - from lldbutil import print_stacktrace + from lldbsuite.test.lldbutil import print_stacktrace stopped_due_to_breakpoint = False for thread in process: if self.TraceOn(): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py index 6c2dd4e83d2..cd8263e6cca 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py @@ -9,7 +9,7 @@ import use_lldb_suite import os, time import re import lldb -from lldbtest import * +from lldbsuite.test.lldbtest import * class RegistersIteratorTestCase(TestBase): @@ -40,7 +40,7 @@ class RegistersIteratorTestCase(TestBase): if not process: self.fail("SBTarget.LaunchProcess() failed") - import lldbutil + import lldbsuite.test.lldbutil as lldbutil for thread in process: if thread.GetStopReason() == lldb.eStopReasonBreakpoint: for frame in thread: diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py index 0632779b12d..6ba2b68e224 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py @@ -9,7 +9,7 @@ import use_lldb_suite import os, time import re import lldb -from lldbtest import * +from lldbsuite.test.lldbtest import * class ThreadsStackTracesTestCase(TestBase): @@ -41,7 +41,7 @@ class ThreadsStackTracesTestCase(TestBase): if not process: self.fail("SBTarget.LaunchProcess() failed") - import lldbutil + import lldbsuite.test.lldbutil as lldbutil if process.GetState() != lldb.eStateStopped: self.fail("Process should be in the 'stopped' state, " "instead the actual state is: '%s'" % diff --git a/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py b/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py index 5af54537b26..4160fc1568b 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py @@ -9,8 +9,8 @@ import use_lldb_suite import os, time import re import lldb -from lldbtest import * -from lldbutil import symbol_type_to_str +from lldbsuite.test.lldbtest import * +from lldbsuite.test.lldbutil import symbol_type_to_str class ModuleAndSectionAPIsTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py b/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py index f267c4b0eee..2c8b2d27d80 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class ObjCSBTypeTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py index ad007d9e2f0..9284a1e5bd2 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py @@ -8,8 +8,8 @@ import use_lldb_suite import os, time import lldb -from lldbutil import get_stopped_thread, state_type_to_str -from lldbtest import * +from lldbsuite.test.lldbutil import get_stopped_thread, state_type_to_str +from lldbsuite.test.lldbtest import * class ProcessAPITestCase(TestBase): @@ -187,7 +187,7 @@ class ProcessAPITestCase(TestBase): location = int(val.GetLocation(), 16) # Note that the canonical from of the bytearray is little endian. - from lldbutil import int_to_bytearray, bytearray_to_int + from lldbsuite.test.lldbutil import int_to_bytearray, bytearray_to_int byteSize = val.GetByteSize() bytes = int_to_bytearray(256, byteSize) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py b/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py index def9f5fcd51..783efbcfd16 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py @@ -6,8 +6,8 @@ import use_lldb_suite import os, sys, time import lldb -from lldbtest import * -import lldbutil +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil class ProcessIOTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Test-rdar-12481949.py b/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Test-rdar-12481949.py index a2a2274a22e..04d54a06770 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Test-rdar-12481949.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Test-rdar-12481949.py @@ -8,8 +8,8 @@ import use_lldb_suite import os, time import lldb -from lldbtest import * -import lldbutil +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil class Radar12481949DataFormatterTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py b/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py index 536101b9af9..40c73187cfe 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py @@ -6,9 +6,9 @@ import use_lldb_suite import os import lldb -from lldbtest import * +from lldbsuite.test.lldbtest import * from math import fabs -import lldbutil +import lldbsuite.test.lldbutil as lldbutil class SBDataAPICase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py b/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py index 356979f0248..80305e303d0 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py @@ -1,4 +1,4 @@ -import lldbinline -import lldbtest +import lldbsuite.test.lldbinline as lldbinline +import lldbsuite.test.lldbtest as lldbtest lldbinline.MakeInlineTest(__file__, globals(), [lldbtest.skipIfFreeBSD,lldbtest.skipIfLinux,lldbtest.skipIfWindows]) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/TestSBValueConstAddrOf.py b/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/TestSBValueConstAddrOf.py index a70d2ca7414..a3d43c1bdee 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/TestSBValueConstAddrOf.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/TestSBValueConstAddrOf.py @@ -1,3 +1,3 @@ -import lldbinline +import lldbsuite.test.lldbinline as lldbinline lldbinline.MakeInlineTest(__file__, globals()) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py b/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py index 7e216c034c4..b56f629242a 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py @@ -6,8 +6,8 @@ import use_lldb_suite import os, sys, time import lldb -from lldbtest import * -import lldbutil +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil class SBValuePersistTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py index 26002fb3400..acbf672a9ec 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py @@ -6,7 +6,7 @@ from __future__ import print_function import use_lldb_suite -from lldbtest import * +from lldbsuite.test.lldbtest import * class SectionAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py index 3ee42de7870..42315a3a096 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py @@ -8,8 +8,8 @@ import use_lldb_suite import os, time import lldb -from lldbutil import get_stopped_thread, state_type_to_str -from lldbtest import * +from lldbsuite.test.lldbutil import get_stopped_thread, state_type_to_str +from lldbsuite.test.lldbtest import * class SignalsAPITestCase(TestBase): mydir = TestBase.compute_mydir(__file__) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py b/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py index 4fb3a8ea6aa..a29f9f01612 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class SymbolContextAPITestCase(TestBase): @@ -44,7 +45,7 @@ class SymbolContextAPITestCase(TestBase): self.assertTrue(process, PROCESS_IS_VALID) # Frame #0 should be on self.line. - from lldbutil import get_stopped_thread + from lldbsuite.test.lldbutil import get_stopped_thread thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint") frame0 = thread.GetFrameAtIndex(0) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py index d3367aa6b24..5f55daa6770 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py @@ -9,8 +9,9 @@ import use_lldb_suite import unittest2 import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class TargetAPITestCase(TestBase): @@ -233,7 +234,7 @@ class TargetAPITestCase(TestBase): target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) - from lldbutil import get_description + from lldbsuite.test.lldbutil import get_description # get_description() allows no option to mean lldb.eDescriptionLevelBrief. desc = get_description(target) @@ -364,7 +365,7 @@ class TargetAPITestCase(TestBase): #print("symbol1:", symbol1) #print("symbol2:", symbol2) - from lldbutil import get_description + from lldbsuite.test.lldbutil import get_description desc1 = get_description(symbol1) desc2 = get_description(symbol2) self.assertTrue(desc1 and desc2 and desc1 == desc2, diff --git a/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py index 82984205e63..e6535a05c15 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py @@ -8,8 +8,8 @@ import use_lldb_suite import os, time import lldb -from lldbutil import get_stopped_thread, get_caller_symbol -from lldbtest import * +from lldbsuite.test.lldbutil import get_stopped_thread, get_caller_symbol +from lldbsuite.test.lldbtest import * class ThreadAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py b/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py index 5c79a9528fc..38b0e15d9fe 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class TypeAndTypeListTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py index 525429b17f9..4380f3e5874 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class ValueAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py index 18c34d3af71..ce9d623e523 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class ChangeValueAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py b/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py index c62c130d9c4..b96351ece32 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py @@ -9,8 +9,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class ValueAsLinkedListTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py b/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py index b7f53c160c6..69a91901a98 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py @@ -7,7 +7,7 @@ import use_lldb_suite import os, sys, time import lldb import time -from lldbtest import * +from lldbsuite.test.lldbtest import * class HelloWorldTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py index 2e513a510f5..620052c6253 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class SetWatchpointAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index b2cb8de82d7..8a7f1758016 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class WatchpointIgnoreCountTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py index c7bc94d859f..9b370253809 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class WatchpointIteratorTestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py index 8d0b4af8fe2..112b0dfd6e8 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py @@ -8,8 +8,8 @@ import use_lldb_suite import os, time import lldb -import lldbutil -from lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class WatchpointConditionAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py index 016ca78e90d..048bc1de738 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class SetWatchlocationAPITestCase(TestBase): diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index 28a8f809bb1..e40d1a6d34e 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -8,8 +8,9 @@ import use_lldb_suite import os, time import re -import lldb, lldbutil -from lldbtest import * +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class TargetWatchAddressAPITestCase(TestBase): |