diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-12-10 23:19:29 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-12-10 23:19:29 +0000 |
| commit | 4570d3eba0db0e322115964257f36a086d89edcb (patch) | |
| tree | fb45581bcbcca8498dafa485def3d4e85383307a /lldb/test/python_api | |
| parent | 88b6898085e8b7d5a577eb0cfb16bf489842324c (diff) | |
| download | bcm5719-llvm-4570d3eba0db0e322115964257f36a086d89edcb.tar.gz bcm5719-llvm-4570d3eba0db0e322115964257f36a086d89edcb.zip | |
Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case.
This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated.
Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you.
llvm-svn: 196985
Diffstat (limited to 'lldb/test/python_api')
36 files changed, 36 insertions, 36 deletions
diff --git a/lldb/test/python_api/debugger/TestDebuggerAPI.py b/lldb/test/python_api/debugger/TestDebuggerAPI.py index a560cbe5377..42dcc24df95 100644 --- a/lldb/test/python_api/debugger/TestDebuggerAPI.py +++ b/lldb/test/python_api/debugger/TestDebuggerAPI.py @@ -9,7 +9,7 @@ from lldbtest import TestBase, python_api_test class DebuggerAPITestCase(TestBase): - mydir = os.path.join("python_api", "debugger") + mydir = TestBase.compute_mydir(__file__) @python_api_test def test_debugger_api_boundary_condition(self): diff --git a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py index 6ec0350d3d5..81b853a5854 100644 --- a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py +++ b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py @@ -19,7 +19,7 @@ from lldbtest import * class APIDefaultConstructorTestCase(TestBase): - mydir = os.path.join("python_api", "default-constructor") + mydir = TestBase.compute_mydir(__file__) @python_api_test def test_SBAddress(self): diff --git a/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py b/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py index e716545ec17..d6d2dc6087e 100644 --- a/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py +++ b/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py @@ -10,7 +10,7 @@ from lldbtest import * class DisassembleRawDataTestCase(TestBase): - mydir = os.path.join("python_api", "disassemble-raw-data") + mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_raw_data(self): diff --git a/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py b/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py index d2e985a12ca..455534518b0 100644 --- a/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py +++ b/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py @@ -10,7 +10,7 @@ from lldbtest import * class Disassemble_VST1_64(TestBase): - mydir = os.path.join("python_api", "disassemble-raw-data") + mydir = TestBase.compute_mydir(__file__) @python_api_test def test_disassemble_invalid_vst_1_64_raw_data(self): diff --git a/lldb/test/python_api/event/TestEvents.py b/lldb/test/python_api/event/TestEvents.py index a9a7edcbbfa..64e95ea3c3c 100644 --- a/lldb/test/python_api/event/TestEvents.py +++ b/lldb/test/python_api/event/TestEvents.py @@ -10,7 +10,7 @@ from lldbtest import * class EventAPITestCase(TestBase): - mydir = os.path.join("python_api", "event") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/formatters/TestFormattersSBAPI.py b/lldb/test/python_api/formatters/TestFormattersSBAPI.py index d304a17dcf5..67aa639fd7b 100644 --- a/lldb/test/python_api/formatters/TestFormattersSBAPI.py +++ b/lldb/test/python_api/formatters/TestFormattersSBAPI.py @@ -8,7 +8,7 @@ import lldbutil class SBFormattersAPITestCase(TestBase): - mydir = os.path.join("python_api", "formatters") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/frame/TestFrames.py b/lldb/test/python_api/frame/TestFrames.py index 6e1ba08c5d6..050c51a524a 100644 --- a/lldb/test/python_api/frame/TestFrames.py +++ b/lldb/test/python_api/frame/TestFrames.py @@ -11,7 +11,7 @@ from lldbtest import * class FrameAPITestCase(TestBase): - mydir = os.path.join("python_api", "frame") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py index 998c3a61b03..f7d1517f7d5 100644 --- a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py +++ b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py @@ -10,7 +10,7 @@ from lldbtest import * class InlinedFrameAPITestCase(TestBase): - mydir = os.path.join("python_api", "frame", "inlines") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py index 11e68162ea8..14ff0058bf9 100644 --- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py +++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class DisasmAPITestCase(TestBase): - mydir = os.path.join("python_api", "function_symbol") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/function_symbol/TestSymbolAPI.py b/lldb/test/python_api/function_symbol/TestSymbolAPI.py index 60d4ffb1d7c..564a60f1951 100644 --- a/lldb/test/python_api/function_symbol/TestSymbolAPI.py +++ b/lldb/test/python_api/function_symbol/TestSymbolAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class SymbolAPITestCase(TestBase): - mydir = os.path.join("python_api", "function_symbol") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/hello_world/TestHelloWorld.py b/lldb/test/python_api/hello_world/TestHelloWorld.py index bfaeaded2ac..088477b79d8 100644 --- a/lldb/test/python_api/hello_world/TestHelloWorld.py +++ b/lldb/test/python_api/hello_world/TestHelloWorld.py @@ -8,7 +8,7 @@ from lldbtest import * class HelloWorldTestCase(TestBase): - mydir = os.path.join("python_api", "hello_world") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/input_reader/TestInputReaderCallback.py b/lldb/test/python_api/input_reader/TestInputReaderCallback.py index 6a37f8b5a4c..8fea84426f1 100644 --- a/lldb/test/python_api/input_reader/TestInputReaderCallback.py +++ b/lldb/test/python_api/input_reader/TestInputReaderCallback.py @@ -8,7 +8,7 @@ from lldbtest import TestBase, python_api_test, dwarf_test class InputReaderCallbackCase(TestBase): - mydir = os.path.join("python_api", "input_reader") + mydir = TestBase.compute_mydir(__file__) @python_api_test @dwarf_test diff --git a/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py b/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py index c08d038b634..b23c4974d35 100644 --- a/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py +++ b/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py @@ -8,7 +8,7 @@ from lldbtest import * class CommandInterpreterAPICase(TestBase): - mydir = os.path.join("python_api", "interpreter") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py index 070fe798842..2b7f341b3b4 100644 --- a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py +++ b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py @@ -9,7 +9,7 @@ from lldbtest import * class FrameUtilsTestCase(TestBase): - mydir = os.path.join("python_api", "lldbutil", "frame") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py index 47fe1659019..8983252a414 100644 --- a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py +++ b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py @@ -10,7 +10,7 @@ from lldbtest import * class LLDBIteratorTestCase(TestBase): - mydir = os.path.join("python_api", "lldbutil", "iter") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py index 9b07625c84d..2f6de65e8c4 100644 --- a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py +++ b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py @@ -10,7 +10,7 @@ from lldbtest import * class RegistersIteratorTestCase(TestBase): - mydir = os.path.join("python_api", "lldbutil", "iter") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py index bb1d303c155..d845c7903bc 100644 --- a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py +++ b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py @@ -10,7 +10,7 @@ from lldbtest import * class ThreadsStackTracesTestCase(TestBase): - mydir = "python_api/lldbutil/process" + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/module_section/TestModuleAndSection.py b/lldb/test/python_api/module_section/TestModuleAndSection.py index 7038d6e7109..44a242da737 100644 --- a/lldb/test/python_api/module_section/TestModuleAndSection.py +++ b/lldb/test/python_api/module_section/TestModuleAndSection.py @@ -11,7 +11,7 @@ from lldbutil import symbol_type_to_str class ModuleAndSectionAPIsTestCase(TestBase): - mydir = os.path.join("python_api", "module_section") + mydir = TestBase.compute_mydir(__file__) @python_api_test def test_module_and_section(self): diff --git a/lldb/test/python_api/objc_type/TestObjCType.py b/lldb/test/python_api/objc_type/TestObjCType.py index 35f83c4b15e..ce31076d611 100644 --- a/lldb/test/python_api/objc_type/TestObjCType.py +++ b/lldb/test/python_api/objc_type/TestObjCType.py @@ -10,7 +10,7 @@ from lldbtest import * class ObjCSBTypeTestCase(TestBase): - mydir = os.path.join("python_api", "objc_type") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/process/TestProcessAPI.py b/lldb/test/python_api/process/TestProcessAPI.py index 016fc1271cd..245c735e41b 100644 --- a/lldb/test/python_api/process/TestProcessAPI.py +++ b/lldb/test/python_api/process/TestProcessAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class ProcessAPITestCase(TestBase): - mydir = os.path.join("python_api", "process") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/process/io/TestProcessIO.py b/lldb/test/python_api/process/io/TestProcessIO.py index 1096bce85a5..7352a8e9d35 100644 --- a/lldb/test/python_api/process/io/TestProcessIO.py +++ b/lldb/test/python_api/process/io/TestProcessIO.py @@ -7,7 +7,7 @@ from lldbtest import * class ProcessIOTestCase(TestBase): - mydir = os.path.join("python_api", "process", "io") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py b/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py index 614a7edf56b..808e64be7f5 100644 --- a/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py +++ b/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py @@ -11,7 +11,7 @@ import lldbutil class Radar12481949DataFormatterTestCase(TestBase): # test for rdar://problem/12481949 - mydir = os.path.join("python_api", "rdar-12481949") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @dsym_test diff --git a/lldb/test/python_api/sbdata/TestSBData.py b/lldb/test/python_api/sbdata/TestSBData.py index 4fd227fcc47..046339ba09b 100644 --- a/lldb/test/python_api/sbdata/TestSBData.py +++ b/lldb/test/python_api/sbdata/TestSBData.py @@ -10,7 +10,7 @@ import lldbutil class SBDataAPICase(TestBase): - mydir = os.path.join("python_api", "sbdata") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/symbol-context/TestSymbolContext.py b/lldb/test/python_api/symbol-context/TestSymbolContext.py index 30d62acab45..d7574ea20d1 100644 --- a/lldb/test/python_api/symbol-context/TestSymbolContext.py +++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py @@ -10,7 +10,7 @@ from lldbtest import * class SymbolContextAPITestCase(TestBase): - mydir = os.path.join("python_api", "symbol-context") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py index 8f2a6dee01b..5516ee667ec 100644 --- a/lldb/test/python_api/target/TestTargetAPI.py +++ b/lldb/test/python_api/target/TestTargetAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class TargetAPITestCase(TestBase): - mydir = os.path.join("python_api", "target") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/thread/TestThreadAPI.py b/lldb/test/python_api/thread/TestThreadAPI.py index 1d22550bbfd..7cb97cd524a 100644 --- a/lldb/test/python_api/thread/TestThreadAPI.py +++ b/lldb/test/python_api/thread/TestThreadAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class ThreadAPITestCase(TestBase): - mydir = os.path.join("python_api", "thread") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/type/TestTypeList.py b/lldb/test/python_api/type/TestTypeList.py index a06259dc85d..ce0a1664d34 100644 --- a/lldb/test/python_api/type/TestTypeList.py +++ b/lldb/test/python_api/type/TestTypeList.py @@ -10,7 +10,7 @@ from lldbtest import * class TypeAndTypeListTestCase(TestBase): - mydir = os.path.join("python_api", "type") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/value/TestValueAPI.py b/lldb/test/python_api/value/TestValueAPI.py index 0d6d341bf0f..024088836a7 100644 --- a/lldb/test/python_api/value/TestValueAPI.py +++ b/lldb/test/python_api/value/TestValueAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class ValueAPITestCase(TestBase): - mydir = os.path.join("python_api", "value") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py index 3d80fa3411c..b716335df71 100644 --- a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py +++ b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class ChangeValueAPITestCase(TestBase): - mydir = os.path.join("python_api", "value", "change_values") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py index f022ec43e4d..c20cc319537 100644 --- a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py +++ b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py @@ -11,7 +11,7 @@ from lldbtest import * class ValueAsLinkedListTestCase(TestBase): - mydir = os.path.join("python_api", "value", "linked_list") + mydir = TestBase.compute_mydir(__file__) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test diff --git a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py index 8c090196d76..37a9e552737 100644 --- a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py +++ b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py @@ -10,7 +10,7 @@ from lldbtest import * class SetWatchpointAPITestCase(TestBase): - mydir = os.path.join("python_api", "watchpoint") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index db169e8b869..b79ef255186 100644 --- a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -10,7 +10,7 @@ from lldbtest import * class WatchpointIgnoreCountTestCase(TestBase): - mydir = os.path.join("python_api", "watchpoint") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/test/python_api/watchpoint/TestWatchpointIter.py index e0fd624a567..8efa10b914b 100644 --- a/lldb/test/python_api/watchpoint/TestWatchpointIter.py +++ b/lldb/test/python_api/watchpoint/TestWatchpointIter.py @@ -10,7 +10,7 @@ from lldbtest import * class WatchpointIteratorTestCase(TestBase): - mydir = os.path.join("python_api", "watchpoint") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py index f756626991e..a38b9d6b1e6 100644 --- a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py +++ b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py @@ -10,7 +10,7 @@ from lldbtest import * class WatchpointConditionAPITestCase(TestBase): - mydir = os.path.join("python_api", "watchpoint", "condition") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py index d9904e891d4..9380c4c2346 100644 --- a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py +++ b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py @@ -10,7 +10,7 @@ from lldbtest import * class SetWatchlocationAPITestCase(TestBase): - mydir = os.path.join("python_api", "watchpoint", "watchlocation") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index 4d05fd6c8cc..c051f98f3e7 100644 --- a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -10,7 +10,7 @@ from lldbtest import * class TargetWatchAddressAPITestCase(TestBase): - mydir = os.path.join("python_api", "watchpoint", "watchlocation") + mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). |

