Add comment headers describing some method groups of our TestBase class.

Remove an unnecessary __import__() function call.

llvm-svn: 132231
This commit is contained in:
Johnny Chen 2011-05-27 23:36:52 +00:00
parent a5149b5cea
commit f359cf2c84
1 changed files with 12 additions and 1 deletions

View File

@ -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