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
diff --git a/lldb/test/lang/c/anonymous/TestAnonymous.py b/lldb/test/lang/c/anonymous/TestAnonymous.py
index 23246e8..7cfb364 100644
--- a/lldb/test/lang/c/anonymous/TestAnonymous.py
+++ b/lldb/test/lang/c/anonymous/TestAnonymous.py
@@ -8,7 +8,7 @@
 
 class AnonymousTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "anonymous")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_expr_nest_with_dsym(self):
diff --git a/lldb/test/lang/c/array_types/TestArrayTypes.py b/lldb/test/lang/c/array_types/TestArrayTypes.py
index ea638db..8bb95cb 100644
--- a/lldb/test/lang/c/array_types/TestArrayTypes.py
+++ b/lldb/test/lang/c/array_types/TestArrayTypes.py
@@ -8,7 +8,7 @@
 
 class ArrayTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "array_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/bitfields/TestBitfields.py b/lldb/test/lang/c/bitfields/TestBitfields.py
index a88291e..c016252 100644
--- a/lldb/test/lang/c/bitfields/TestBitfields.py
+++ b/lldb/test/lang/c/bitfields/TestBitfields.py
@@ -8,7 +8,7 @@
 
 class BitfieldsTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "bitfields")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/blocks/TestBlocks.py b/lldb/test/lang/c/blocks/TestBlocks.py
index 124f5f2..85f3e64 100644
--- a/lldb/test/lang/c/blocks/TestBlocks.py
+++ b/lldb/test/lang/c/blocks/TestBlocks.py
@@ -8,7 +8,7 @@
 
 class BlocksTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "blocks")
+    mydir = TestBase.compute_mydir(__file__)
     lines = []
 
     @unittest2.expectedFailure
diff --git a/lldb/test/lang/c/const_variables/TestConstVariables.py b/lldb/test/lang/c/const_variables/TestConstVariables.py
index 187ed9a..ce6a8c1 100644
--- a/lldb/test/lang/c/const_variables/TestConstVariables.py
+++ b/lldb/test/lang/c/const_variables/TestConstVariables.py
@@ -8,7 +8,7 @@
 
 class ConstVariableTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "const_variables")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     @unittest2.expectedFailure(13314878)
diff --git a/lldb/test/lang/c/enum_types/TestEnumTypes.py b/lldb/test/lang/c/enum_types/TestEnumTypes.py
index e0ec933..a0f8217 100644
--- a/lldb/test/lang/c/enum_types/TestEnumTypes.py
+++ b/lldb/test/lang/c/enum_types/TestEnumTypes.py
@@ -8,7 +8,7 @@
 
 class EnumTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "enum_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/forward/TestForwardDeclaration.py b/lldb/test/lang/c/forward/TestForwardDeclaration.py
index 7ded56c..db088ab 100644
--- a/lldb/test/lang/c/forward/TestForwardDeclaration.py
+++ b/lldb/test/lang/c/forward/TestForwardDeclaration.py
@@ -8,7 +8,7 @@
 
 class ForwardDeclarationTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "forward")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/function_types/TestFunctionTypes.py b/lldb/test/lang/c/function_types/TestFunctionTypes.py
index a9acced..9b4241c 100644
--- a/lldb/test/lang/c/function_types/TestFunctionTypes.py
+++ b/lldb/test/lang/c/function_types/TestFunctionTypes.py
@@ -8,7 +8,7 @@
 
 class FunctionTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "function_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/global_variables/TestGlobalVariables.py b/lldb/test/lang/c/global_variables/TestGlobalVariables.py
index 84f1e7c..710782c 100644
--- a/lldb/test/lang/c/global_variables/TestGlobalVariables.py
+++ b/lldb/test/lang/c/global_variables/TestGlobalVariables.py
@@ -8,7 +8,7 @@
 
 class GlobalVariablesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "global_variables")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/set_values/TestSetValues.py b/lldb/test/lang/c/set_values/TestSetValues.py
index 5705a04..70a65d7 100644
--- a/lldb/test/lang/c/set_values/TestSetValues.py
+++ b/lldb/test/lang/c/set_values/TestSetValues.py
@@ -8,7 +8,7 @@
 
 class SetValuesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "set_values")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/shared_lib/TestSharedLib.py b/lldb/test/lang/c/shared_lib/TestSharedLib.py
index cd612e9..c5af5bd 100644
--- a/lldb/test/lang/c/shared_lib/TestSharedLib.py
+++ b/lldb/test/lang/c/shared_lib/TestSharedLib.py
@@ -8,7 +8,7 @@
 
 class SharedLibTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "shared_lib")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_expr_with_dsym(self):
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 a3f7922d..f8f9b4a 100644
--- a/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
+++ b/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
@@ -8,7 +8,7 @@
 
 class SharedLibTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "shared_lib")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_expr_with_dsym(self):
diff --git a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
index 41c16e9..81a937a 100644
--- a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
+++ b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
@@ -8,7 +8,7 @@
 
 class TestCStepping(TestBase):
 
-    mydir = os.path.join("lang", "c", "stepping")
+    mydir = TestBase.compute_mydir(__file__)
 
     def getCategories(self):
         return ['basic_process']
diff --git a/lldb/test/lang/c/stepping/TestThreadStepping.py b/lldb/test/lang/c/stepping/TestThreadStepping.py
index 8e7952a..747ef4a 100644
--- a/lldb/test/lang/c/stepping/TestThreadStepping.py
+++ b/lldb/test/lang/c/stepping/TestThreadStepping.py
@@ -11,7 +11,7 @@
 
 class ThreadSteppingTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "stepping")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/strings/TestCStrings.py b/lldb/test/lang/c/strings/TestCStrings.py
index 5870451..636777e 100644
--- a/lldb/test/lang/c/strings/TestCStrings.py
+++ b/lldb/test/lang/c/strings/TestCStrings.py
@@ -7,7 +7,7 @@
 
 class CStringsTestCase(TestBase):
     
-    mydir = os.path.join("lang", "c", "strings")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/c/struct_types/TestStructTypes.py b/lldb/test/lang/c/struct_types/TestStructTypes.py
index b983513..1ec0ec7 100644
--- a/lldb/test/lang/c/struct_types/TestStructTypes.py
+++ b/lldb/test/lang/c/struct_types/TestStructTypes.py
@@ -12,7 +12,7 @@
 
 class StructTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "struct_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     # rdar://problem/12566646
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
diff --git a/lldb/test/lang/c/tls_globals/TestTlsGlobals.py b/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
index f1d56d6..1141962 100644
--- a/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
+++ b/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
@@ -8,7 +8,7 @@
 
 class TlsGlobalTestCase(TestBase):
 
-    mydir = os.path.join("lang", "c", "tls_globals")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/bool/TestCPPBool.py b/lldb/test/lang/cpp/bool/TestCPPBool.py
index 0337cca..a8ee86e 100644
--- a/lldb/test/lang/cpp/bool/TestCPPBool.py
+++ b/lldb/test/lang/cpp/bool/TestCPPBool.py
@@ -7,7 +7,7 @@
 
 class CPPBoolTestCase(TestBase):
     
-    mydir = os.path.join("lang", "cpp", "bool")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/breakpoints/TestCPPBreakpoints.py b/lldb/test/lang/cpp/breakpoints/TestCPPBreakpoints.py
index 367d75d..675e5b4 100644
--- a/lldb/test/lang/cpp/breakpoints/TestCPPBreakpoints.py
+++ b/lldb/test/lang/cpp/breakpoints/TestCPPBreakpoints.py
@@ -9,7 +9,7 @@
 
 class CPPBreakpointTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "breakpoints")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py b/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py
index c573770..a026f14 100644
--- a/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py
+++ b/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py
@@ -8,7 +8,7 @@
 
 class CallCPPFunctionTestCase(TestBase):
     
-    mydir = os.path.join("lang", "cpp", "call-function")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
index 9747794..445c1dd 100644
--- a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
+++ b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
@@ -11,7 +11,7 @@
 
 class Char1632TestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "char1632_t")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/class_static/TestStaticVariables.py b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
index 248763e..6ecefd3 100644
--- a/lldb/test/lang/cpp/class_static/TestStaticVariables.py
+++ b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
@@ -10,7 +10,7 @@
 
 class StaticVariableTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "class_static")
+    mydir = TestBase.compute_mydir(__file__)
     failing_compilers = ['clang', 'gcc']
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypes.py b/lldb/test/lang/cpp/class_types/TestClassTypes.py
index 76e8ace..b41ca39 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypes.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypes.py
@@ -9,7 +9,7 @@
 
 class ClassTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "class_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
index d11dba1..2e79abc 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
@@ -10,7 +10,7 @@
 
 class IterateFrameAndDisassembleTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "class_types")
+    mydir = TestBase.compute_mydir(__file__)
     failing_compilers = ['clang', 'gcc']
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
diff --git a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
index c11a351..b2afaa5 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
@@ -10,7 +10,7 @@
 
 class CppValueCastTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "dynamic-value")
+    mydir = TestBase.compute_mydir(__file__)
 
     # rdar://problem/10808472 SBValue::Cast test case is failing (virtual inheritance)
     @unittest2.expectedFailure
diff --git a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
index 34ecbd3..b0698d8 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -10,7 +10,7 @@
 
 class DynamicValueTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "dynamic-value")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
index 3899674..77dbaea 100644
--- a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
+++ b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
@@ -8,7 +8,7 @@
 
 class CPP11EnumTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "enum_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
index c294b54..122ff94 100644
--- a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
+++ b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
@@ -10,7 +10,7 @@
 
 class CPPBreakpointTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "exceptions")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/namespace/TestNamespace.py b/lldb/test/lang/cpp/namespace/TestNamespace.py
index ecfa330..e9f78e0 100644
--- a/lldb/test/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/lang/cpp/namespace/TestNamespace.py
@@ -10,7 +10,7 @@
 
 class NamespaceTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "namespace")
+    mydir = TestBase.compute_mydir(__file__)
 
     # rdar://problem/8668674
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
diff --git a/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py b/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
index 634c28c0..987b15f 100644
--- a/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
+++ b/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
@@ -8,7 +8,7 @@
 
 class CPPStaticMethodsTestCase(TestBase):
     
-    mydir = os.path.join("lang", "cpp", "overloaded-functions")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
index 601c8e9..faa0488 100644
--- a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
+++ b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
@@ -24,7 +24,7 @@
 
 class Rdar12991846TestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "rdar12991846")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.expectedFailure
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
diff --git a/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py b/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py
index 9c9f08f..803f7be 100644
--- a/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py
+++ b/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py
@@ -8,7 +8,7 @@
 
 class RvalueReferencesTestCase(TestBase):
     
-    mydir = os.path.join("lang", "cpp", "rvalue-references")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     #rdar://problem/11479676
diff --git a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
index e9de2d9..6effad0 100644
--- a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
+++ b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -11,7 +11,7 @@
 
 class UnsignedTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "signed_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
index a553ff4..d49b86a 100644
--- a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
+++ b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
@@ -7,7 +7,7 @@
 
 class CPPStaticMembersTestCase(TestBase):
     
-    mydir = os.path.join("lang", "cpp", "static_members")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @unittest2.expectedFailure # llvm.org/pr15401
diff --git a/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py b/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py
index 357b050..25dec6f 100644
--- a/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py
+++ b/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py
@@ -8,7 +8,7 @@
 
 class CPPStaticMethodsTestCase(TestBase):
     
-    mydir = os.path.join("lang", "cpp", "static_methods")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/stl/TestSTL.py b/lldb/test/lang/cpp/stl/TestSTL.py
index 2c09d6b..ffb02e2 100644
--- a/lldb/test/lang/cpp/stl/TestSTL.py
+++ b/lldb/test/lang/cpp/stl/TestSTL.py
@@ -10,7 +10,7 @@
 
 class STLTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "stl")
+    mydir = TestBase.compute_mydir(__file__)
 
     # rdar://problem/10400981
     @unittest2.expectedFailure
diff --git a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
index 8914e2a..c05c2fc 100644
--- a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
+++ b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
@@ -10,7 +10,7 @@
 
 class StdCXXDisassembleTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "stl")
+    mydir = TestBase.compute_mydir(__file__)
 
     def setUp(self):
         # Call super's setUp().
diff --git a/lldb/test/lang/cpp/this/TestCPPThis.py b/lldb/test/lang/cpp/this/TestCPPThis.py
index 0cb7404..62bed20 100644
--- a/lldb/test/lang/cpp/this/TestCPPThis.py
+++ b/lldb/test/lang/cpp/this/TestCPPThis.py
@@ -7,7 +7,7 @@
 
 class CPPThisTestCase(TestBase):
     
-    mydir = os.path.join("lang", "cpp", "this")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     #rdar://problem/9962849
diff --git a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
index 3579f7a..e07c02e 100644
--- a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
+++ b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
@@ -9,7 +9,7 @@
 
 class UniqueTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "unique-types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
index ddf768e..66b4a54 100644
--- a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
+++ b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
@@ -11,7 +11,7 @@
 
 class UnsignedTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "unsigned_types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/cpp/virtual/TestVirtual.py b/lldb/test/lang/cpp/virtual/TestVirtual.py
index 2d811ab..4c1fff1 100644
--- a/lldb/test/lang/cpp/virtual/TestVirtual.py
+++ b/lldb/test/lang/cpp/virtual/TestVirtual.py
@@ -13,7 +13,7 @@
 
 class CppVirtualMadness(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "virtual")
+    mydir = TestBase.compute_mydir(__file__)
 
     # This is the pattern by design to match the "my_expr = 'value'" output from
     # printf() stmts (see main.cpp).
diff --git a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
index 52fab1f9..3d286d8 100644
--- a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
+++ b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
@@ -11,7 +11,7 @@
 
 class CxxWCharTTestCase(TestBase):
 
-    mydir = os.path.join("lang", "cpp", "wchar_t")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
index 0213c46..40d7bfc 100644
--- a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
+++ b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
@@ -8,7 +8,7 @@
 
 class TestObjCIvarsInBlocks(TestBase):
 
-    mydir = os.path.join("lang", "objc", "blocks")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     # This test requires the 2.0 runtime, so it will fail on i386.
diff --git a/lldb/test/lang/objc/forward-decl/TestForwardDecl.py b/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
index 24ede4c..abcddae 100644
--- a/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
+++ b/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
@@ -8,7 +8,7 @@
 
 class ForwardDeclTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "forward-decl")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/objc/foundation/TestConstStrings.py b/lldb/test/lang/objc/foundation/TestConstStrings.py
index e19d09e..cafea53 100644
--- a/lldb/test/lang/objc/foundation/TestConstStrings.py
+++ b/lldb/test/lang/objc/foundation/TestConstStrings.py
@@ -12,7 +12,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class ConstStringTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "foundation")
+    mydir = TestBase.compute_mydir(__file__)
     d = {'OBJC_SOURCES': 'const-strings.m'}
 
     @dsym_test
diff --git a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
index 11dda65..b067640 100644
--- a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
+++ b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class FoundationDisassembleTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "foundation")
+    mydir = TestBase.compute_mydir(__file__)
 
     # rdar://problem/8504895
     # Crash while doing 'disassemble -n "-[NSNumber descriptionWithLocale:]"
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods.py b/lldb/test/lang/objc/foundation/TestObjCMethods.py
index 380c448..67c96c1 100644
--- a/lldb/test/lang/objc/foundation/TestObjCMethods.py
+++ b/lldb/test/lang/objc/foundation/TestObjCMethods.py
@@ -12,7 +12,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class FoundationTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "foundation")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_break_with_dsym(self):
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods2.py b/lldb/test/lang/objc/foundation/TestObjCMethods2.py
index 37e3f1e..3385a0f 100644
--- a/lldb/test/lang/objc/foundation/TestObjCMethods2.py
+++ b/lldb/test/lang/objc/foundation/TestObjCMethods2.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class FoundationTestCase2(TestBase):
 
-    mydir = os.path.join("lang", "objc", "foundation")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_more_expr_commands_with_dsym(self):
diff --git a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
index 1c42553..09a03d4 100644
--- a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
+++ b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
@@ -10,7 +10,7 @@
 
 class ObjectDescriptionAPITestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "foundation")
+    mydir = TestBase.compute_mydir(__file__)
 
     # rdar://problem/10857337
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
diff --git a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
index dbdd82f..0cfa89b 100644
--- a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
+++ b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class RuntimeTypesTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "foundation")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_break_with_dsym(self):
diff --git a/lldb/test/lang/objc/foundation/TestSymbolTable.py b/lldb/test/lang/objc/foundation/TestSymbolTable.py
index c41874a..28b5f73 100644
--- a/lldb/test/lang/objc/foundation/TestSymbolTable.py
+++ b/lldb/test/lang/objc/foundation/TestSymbolTable.py
@@ -10,7 +10,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class FoundationSymtabTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "foundation")
+    mydir = TestBase.compute_mydir(__file__)
 
     symbols_list = ['-[MyString initWithNSString:]',
                     '-[MyString dealloc]',
diff --git a/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py b/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
index 1f50de9..f8a768c 100644
--- a/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
+++ b/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
@@ -8,7 +8,7 @@
 
 class HiddenIvarsTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "hidden-ivars")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/objc/objc++/TestObjCXX.py b/lldb/test/lang/objc/objc++/TestObjCXX.py
index 484d729..0658b84 100644
--- a/lldb/test/lang/objc/objc++/TestObjCXX.py
+++ b/lldb/test/lang/objc/objc++/TestObjCXX.py
@@ -10,7 +10,7 @@
 
 class ObjCXXTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc++")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_break_with_dsym(self):
diff --git a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
index 0a98469..6aca65b 100644
--- a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
+++ b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
@@ -10,7 +10,7 @@
 
 class ObjCDynamicValueTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-baseclass-sbtype")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
index e0ebee67..b43ad7a 100644
--- a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
+++ b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
@@ -8,7 +8,7 @@
 
 class TestObjCBuiltinTypes(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-builtin-types")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
index fd3d76c..28659ff 100644
--- a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
+++ b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
@@ -10,7 +10,7 @@
 
 class ObjCCheckerTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-checker")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
index c158385..9fc2721 100644
--- a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
+++ b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
@@ -8,7 +8,7 @@
 
 class TestObjCClassMethod(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-class-method")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py b/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
index 3d14339..335aab3 100644
--- a/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
+++ b/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class ObjCDynamicSBTypeTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-dyn-sbtype")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     @skipIfi386
diff --git a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
index bd77aa3..e679ca2 100644
--- a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
+++ b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
@@ -10,7 +10,7 @@
 
 class ObjCDynamicValueTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-dynamic-value")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
index b4d7137..1df069f 100644
--- a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
+++ b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
@@ -8,7 +8,7 @@
 
 class TestObjCIvarOffsets(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-ivar-offsets")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
index fef0921..3a116bb 100644
--- a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
+++ b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
@@ -8,7 +8,7 @@
 
 class TestObjCIvarStripped(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-ivar-stripped")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
index 2f1f5b0..b3dcafc 100644
--- a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
+++ b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
@@ -12,7 +12,7 @@
 
 class ObjCNewSyntaxTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-new-syntax")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.expectedFailure
     @dsym_test
diff --git a/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py b/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
index a7a9d23..55127c3 100644
--- a/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
+++ b/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
@@ -19,7 +19,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class ObjcOptimizedTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-optimized")
+    mydir = TestBase.compute_mydir(__file__)
     myclass = "MyClass"
     mymethod = "description"
     method_spec = "-[%s %s]" % (myclass, mymethod)
diff --git a/lldb/test/lang/objc/objc-property/TestObjCProperty.py b/lldb/test/lang/objc/objc-property/TestObjCProperty.py
index dadb7fa..2a2bd01 100644
--- a/lldb/test/lang/objc/objc-property/TestObjCProperty.py
+++ b/lldb/test/lang/objc/objc-property/TestObjCProperty.py
@@ -10,7 +10,7 @@
 
 class ObjCPropertyTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-property")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
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 bf7e059..c14432c 100644
--- a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
+++ b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
@@ -8,7 +8,7 @@
 
 class TestObjCStaticMethodStripped(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-static-method-stripped")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
index 3196830..a898631 100644
--- a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
+++ b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
@@ -8,7 +8,7 @@
 
 class TestObjCStaticMethod(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-static-method")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
index 48900d2..8bee8c0 100644
--- a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
+++ b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
@@ -11,7 +11,7 @@
     def getCategories (self):
         return ['basic_process']
 
-    mydir = os.path.join("lang", "objc", "objc-stepping")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
diff --git a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
index 788310b..8490d1c 100644
--- a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
+++ b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
@@ -8,7 +8,7 @@
 
 class TestObjCClassMethod(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-class-method")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @python_api_test
@@ -30,7 +30,7 @@
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line numbers to break inside main().
-        self.main_source = "class.m"
+        self.main_source = "test.m"
         self.break_line = line_number(self.main_source, '// Set breakpoint here.')
 
     def objc_class_method(self):
diff --git a/lldb/test/lang/objc/objc-super/TestObjCSuper.py b/lldb/test/lang/objc/objc-super/TestObjCSuper.py
index 746e29c..15b5218 100644
--- a/lldb/test/lang/objc/objc-super/TestObjCSuper.py
+++ b/lldb/test/lang/objc/objc-super/TestObjCSuper.py
@@ -8,7 +8,7 @@
 
 class TestObjCSuperMethod(TestBase):
 
-    mydir = os.path.join("lang", "objc", "objc-super")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @expectedFailurei386
diff --git a/lldb/test/lang/objc/print-obj/TestPrintObj.py b/lldb/test/lang/objc/print-obj/TestPrintObj.py
index 66b5958..acd4f7d 100644
--- a/lldb/test/lang/objc/print-obj/TestPrintObj.py
+++ b/lldb/test/lang/objc/print-obj/TestPrintObj.py
@@ -10,7 +10,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class PrintObjTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "print-obj")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_print_obj_with_dsym(self):
diff --git a/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
index 8f48196..20aecde 100644
--- a/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
+++ b/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class MethodReturningBOOLTestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "radar-9691614")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_method_ret_BOOL_with_dsym(self):
diff --git a/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py b/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
index 15e843b..ecc80eb 100644
--- a/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
+++ b/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class Rdar10967107TestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "rdar-10967107")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_cfrange_diff_cfgregoriandate_with_dsym(self):
diff --git a/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py b/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
index 1dbf680..165948d 100644
--- a/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
+++ b/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class Rdar10967107TestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "rdar-11355592")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_charstar_dyntype_with_dsym(self):
diff --git a/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py b/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
index 7f88424..caae896 100644
--- a/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
+++ b/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
@@ -11,7 +11,7 @@
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class Rdar12408181TestCase(TestBase):
 
-    mydir = os.path.join("lang", "objc", "rdar-12408181")
+    mydir = TestBase.compute_mydir(__file__)
 
     @dsym_test
     def test_nswindow_count_with_dsym(self):
diff --git a/lldb/test/lang/objc/real-definition/TestRealDefinition.py b/lldb/test/lang/objc/real-definition/TestRealDefinition.py
index 8530f35..dd476fc 100644
--- a/lldb/test/lang/objc/real-definition/TestRealDefinition.py
+++ b/lldb/test/lang/objc/real-definition/TestRealDefinition.py
@@ -8,7 +8,7 @@
 
 class TestRealDefinition(TestBase):
 
-    mydir = os.path.join("lang", "objc", "real-definition")
+    mydir = TestBase.compute_mydir(__file__)
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test
diff --git a/lldb/test/lang/objc/self/TestObjCSelf.py b/lldb/test/lang/objc/self/TestObjCSelf.py
index e7733ab..cc58bf2 100644
--- a/lldb/test/lang/objc/self/TestObjCSelf.py
+++ b/lldb/test/lang/objc/self/TestObjCSelf.py
@@ -7,7 +7,7 @@
 
 class ObjCSelfTestCase(TestBase):
     
-    mydir = os.path.join("lang", "objc", "self")
+    mydir = TestBase.compute_mydir(__file__)
     
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     @dsym_test