aboutsummaryrefslogtreecommitdiff
path: root/test/lldbtest.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-06-23 22:11:20 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-06-23 22:11:20 +0000
commitb7e27f4ed399c04362e2f40ba1d800846b819077 (patch)
tree0a641de1fdfe9e3853325dd4c4567632253fcc67 /test/lldbtest.py
parent3182effd150f2e0381d7c6867236737ac69ad846 (diff)
downloadlldb-b7e27f4ed399c04362e2f40ba1d800846b819077.tar.gz
o lldbtest.py:
Assign the test method name to self.testMethodName. This can be useful for the test directory (see test/types for a good example) which houses a bunch of executables compiled from different source files. The default build action is to create a.out as the binary executable, which can confuse the module cacheing mechanism and result in the debugger getting a stale image as the target to be debugged, and chaos ensues. o AbstractBase.py, TestThreadAPI.py: Use self.testMethodName to our advantage. o TestLoadUnload.py: Add expected failure marker to test case test_modules_search_paths(). git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lldbtest.py')
-rw-r--r--test/lldbtest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lldbtest.py b/test/lldbtest.py
index 0b3cf9c26..33f940034 100644
--- a/test/lldbtest.py
+++ b/test/lldbtest.py
@@ -356,6 +356,7 @@ class TestBase(unittest2.TestCase):
- The setUp method sets up things to facilitate subsequent interactions
with the debugger as part of the test. These include:
+ - populate the test method name
- create/get a debugger set with synchronous mode (self.dbg)
- get the command interpreter from with the debugger (self.ci)
- create a result object for use with the command interpreter
@@ -478,6 +479,14 @@ class TestBase(unittest2.TestCase):
#import traceback
#traceback.print_stack()
+ # Assign the test method name to self.testMethodName.
+ #
+ # For an example of the use of this attribute, look at test/types dir.
+ # There are a bunch of test cases under test/types and we don't want the
+ # module cacheing subsystem to be confused with executable name "a.out"
+ # used for all the test cases.
+ self.testMethodName = self._testMethodName
+
if "LLDB_EXEC" in os.environ:
self.lldbExec = os.environ["LLDB_EXEC"]