forked from OSchip/llvm-project
Added buildDsym() and buildDwarf() methods to lldbtest.TestBase class, and call
them from test cases instead of issuing "make clean; make ..." os command. llvm-svn: 112542
This commit is contained in:
parent
1286617c64
commit
2f1ad5e2bd
|
@ -15,7 +15,7 @@ class TestHelloWorld(TestBase):
|
|||
|
||||
Use dsym info and lldb "run" command.
|
||||
"""
|
||||
self.system(["/bin/sh", "-c", "make clean; make MAKE_DSYM=YES"])
|
||||
self.buildDsym()
|
||||
self.hello_world_python(useLaunchAPI = False)
|
||||
|
||||
@unittest2.expectedFailure
|
||||
|
@ -24,7 +24,7 @@ class TestHelloWorld(TestBase):
|
|||
|
||||
Use dwarf map (no dsym) and process launch API.
|
||||
"""
|
||||
self.system(["/bin/sh", "-c", "make clean; make MAKE_DSYM=NO"])
|
||||
self.buildDwarf()
|
||||
self.hello_world_python(useLaunchAPI = True)
|
||||
|
||||
def hello_world_python(self, useLaunchAPI):
|
||||
|
|
|
@ -404,6 +404,20 @@ class TestBase(unittest2.TestCase):
|
|||
raise CalledProcessError(retcode, cmd, output=output)
|
||||
return output
|
||||
|
||||
def buildDsym(self):
|
||||
"""Platform specific way to build binaries with dsym info."""
|
||||
if sys.platform.startswith("darwin"):
|
||||
self.system(["/bin/sh", "-c", "make clean; make MAKE_DSYM=YES"])
|
||||
else:
|
||||
raise Exception("Don't know how to build binary with dsym")
|
||||
|
||||
def buildDwarf(self):
|
||||
"""Platform specific way to build binaries with dwarf maps."""
|
||||
if sys.platform.startswith("darwin"):
|
||||
self.system(["/bin/sh", "-c", "make clean; make MAKE_DSYM=NO"])
|
||||
else:
|
||||
raise Exception("Don't know how to build binary with dwarf")
|
||||
|
||||
def DebugSBValue(self, frame, val):
|
||||
"""Debug print a SBValue object, if self.traceAlways is True."""
|
||||
if not self.traceAlways:
|
||||
|
|
Loading…
Reference in New Issue