aboutsummaryrefslogtreecommitdiff
path: root/test/lldbtest.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-05-27 23:36:52 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-05-27 23:36:52 +0000
commitb877031f1972bc40f25cdda9532d7c30d25f3412 (patch)
tree9237b8a90739bd697399b0d4b43ff424130ca4aa /test/lldbtest.py
parent8c2e28d572ea5c76e5a1e4373eaa4e2ad244afe7 (diff)
downloadlldb-b877031f1972bc40f25cdda9532d7c30d25f3412.tar.gz
Add comment headers describing some method groups of our TestBase class.
Remove an unnecessary __import__() function call. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lldbtest.py')
-rw-r--r--test/lldbtest.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/lldbtest.py b/test/lldbtest.py
index 159c0aa75..aca7d93e1 100644
--- a/test/lldbtest.py
+++ b/test/lldbtest.py
@@ -919,6 +919,10 @@ class TestBase(unittest2.TestCase):
# End of while loop.
+ # ====================================================
+ # Config. methods supported through a plugin interface
+ # (enables reading of the current test configuration)
+ # ====================================================
def getArchitecture(self):
"""Returns the architecture in effect the test suite is now running with."""
@@ -933,7 +937,6 @@ class TestBase(unittest2.TestCase):
def getRunOptions(self):
"""Command line option for -A and -C to run this test again, called from
within dumpSessionInfo()."""
- module = __import__(sys.platform)
arch = self.getArchitecture()
comp = self.getCompiler()
if not arch and not comp:
@@ -942,6 +945,10 @@ class TestBase(unittest2.TestCase):
return "%s %s" % ("-A "+arch if arch else "",
"-C "+comp if comp else "")
+ # ==================================================
+ # Build methods supported through a plugin interface
+ # ==================================================
+
def buildDefault(self, architecture=None, compiler=None, dictionary=None):
"""Platform specific way to build the default binaries."""
module = __import__(sys.platform)
@@ -960,6 +967,10 @@ class TestBase(unittest2.TestCase):
if not module.buildDwarf(self, architecture, compiler, dictionary):
raise Exception("Don't know how to build binary with dwarf")
+ # =================================================
+ # Misc. helper methods for debugging test execution
+ # =================================================
+
def DebugSBValue(self, frame, val):
"""Debug print a SBValue object, if traceAlways is True."""
from lldbutil import value_type_to_str