summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-08-30 22:26:48 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-08-30 22:26:48 +0000
commit2f1ad5e2bd577fd7db6b3e4f30252fdcf6bd00eb (patch)
tree4dc22e7af4c853714d8ad02de34be61a51f0691d
parent1286617c648efa1556c50d25281ef7a6dd7750ad (diff)
downloadbcm5719-llvm-2f1ad5e2bd577fd7db6b3e4f30252fdcf6bd00eb.tar.gz
bcm5719-llvm-2f1ad5e2bd577fd7db6b3e4f30252fdcf6bd00eb.zip
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
-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