[Lldb-commits] [lldb] r112542 - in /lldb/trunk/test: hello_world/TestHelloWorld.py lldbtest.py

Johnny Chen johnny.chen at apple.com
Mon Aug 30 15:26:48 PDT 2010


Author: johnny
Date: Mon Aug 30 17:26:48 2010
New Revision: 112542

URL: http://llvm.org/viewvc/llvm-project?rev=112542&view=rev
Log:
Added buildDsym() and buildDwarf() methods to lldbtest.TestBase class, and call
them from test cases instead of issuing "make clean; make ..." os command.

Modified:
    lldb/trunk/test/hello_world/TestHelloWorld.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/hello_world/TestHelloWorld.py?rev=112542&r1=112541&r2=112542&view=diff
==============================================================================
--- lldb/trunk/test/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/hello_world/TestHelloWorld.py Mon Aug 30 17:26:48 2010
@@ -15,7 +15,7 @@
 
         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 @@
 
         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):

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=112542&r1=112541&r2=112542&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Mon Aug 30 17:26:48 2010
@@ -404,6 +404,20 @@
             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:





More information about the lldb-commits mailing list