summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/hello_world/TestHelloWorld.py4
-rw-r--r--lldb/test/lldbtest.py14
2 files changed, 16 insertions, 2 deletions
diff --git a/lldb/test/hello_world/TestHelloWorld.py b/lldb/test/hello_world/TestHelloWorld.py
index a51b727cf37..82e3b97fda6 100644
--- a/lldb/test/hello_world/TestHelloWorld.py
+++ b/lldb/test/hello_world/TestHelloWorld.py
@@ -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):
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index 132dc72b121..5b5530743f2 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -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:
OpenPOWER on IntegriCloud