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/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py
index bbc9e78..63f67b2 100644
--- a/lldb/test/functionalities/command_script/TestCommandScript.py
+++ b/lldb/test/functionalities/command_script/TestCommandScript.py
@@ -9,7 +9,7 @@
class CmdPythonTestCase(TestBase):
- mydir = os.path.join("functionalities", "command_script")
+ mydir = TestBase.compute_mydir(__file__)
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
diff --git a/lldb/test/functionalities/command_script/import/TestImport.py b/lldb/test/functionalities/command_script/import/TestImport.py
index 07b0b07..393285b 100644
--- a/lldb/test/functionalities/command_script/import/TestImport.py
+++ b/lldb/test/functionalities/command_script/import/TestImport.py
@@ -7,7 +7,7 @@
class ImportTestCase(TestBase):
- mydir = os.path.join("functionalities", "command_script", "import")
+ mydir = TestBase.compute_mydir(__file__)
@python_api_test
def test_import_command(self):
diff --git a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
index dc47906..e940261 100644
--- a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
+++ b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
@@ -7,7 +7,7 @@
class Rdar12586188TestCase(TestBase):
- mydir = os.path.join("functionalities", "command_script", "import", "rdar-12586188")
+ mydir = TestBase.compute_mydir(__file__)
@python_api_test
def test_rdar12586188_command(self):