[Lldb-commits] [lldb] r226856 - Make OSX test run firewall friendly.

Oleksiy Vyalov ovyalov at google.com
Thu Jan 22 12:03:21 PST 2015


Author: ovyalov
Date: Thu Jan 22 14:03:21 2015
New Revision: 226856

URL: http://llvm.org/viewvc/llvm-project?rev=226856&view=rev
Log:
Make OSX test run firewall friendly.

http://reviews.llvm.org/D7115

Modified:
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
    lldb/trunk/test/api/multithreaded/TestMultithreaded.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=226856&r1=226855&r2=226856&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Jan 22 14:03:21 2015
@@ -5282,6 +5282,7 @@
 			buildPhases = (
 				26F5C26710F3D9A4009D5894 /* Sources */,
 				26F5C26810F3D9A4009D5894 /* Frameworks */,
+				25ED0ED41A70979C00E3DA2E /* ShellScript */,
 			);
 			buildRules = (
 			);
@@ -5412,6 +5413,19 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
+		25ED0ED41A70979C00E3DA2E /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\ncodesign -f -s lldb_codesign \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}\"\nfi";
+		};
 		261B5A7511C3FA6F00AABD0A /* Fixup Framework Headers */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;

Modified: lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py?rev=226856&r1=226855&r2=226856&view=diff
==============================================================================
--- lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py (original)
+++ lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py Thu Jan 22 14:03:21 2015
@@ -26,6 +26,7 @@ class TestMultipleSimultaneousDebuggers(
         self.driver_exe = os.path.join(os.getcwd(), "multi-process-driver")
         self.buildDriver('multi-process-driver.cpp', self.driver_exe)
         self.addTearDownHook(lambda: os.remove(self.driver_exe))
+        self.signBinary(self.driver_exe)
 
         self.inferior_exe = os.path.join(os.getcwd(), "testprog")
         self.buildDriver('testprog.cpp', self.inferior_exe)

Modified: lldb/trunk/test/api/multithreaded/TestMultithreaded.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multithreaded/TestMultithreaded.py?rev=226856&r1=226855&r2=226856&view=diff
==============================================================================
--- lldb/trunk/test/api/multithreaded/TestMultithreaded.py (original)
+++ lldb/trunk/test/api/multithreaded/TestMultithreaded.py Thu Jan 22 14:03:21 2015
@@ -66,7 +66,9 @@ class SBBreakpointCallbackCase(TestBase)
         self.buildDriver(sources, test_name)
         self.addTearDownHook(lambda: os.remove(test_name))
 
-        exe = [os.path.join(os.getcwd(), test_name), self.inferior]
+        test_exe = os.path.join(os.getcwd(), test_name)
+        self.signBinary(test_exe)
+        exe = [test_exe, self.inferior]
 
         env = {self.dylibPath : self.getLLDBLibraryEnvVal()}
         if self.TraceOn():

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=226856&r1=226855&r2=226856&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu Jan 22 14:03:21 2015
@@ -1422,6 +1422,11 @@ class Base(unittest2.TestCase):
         if not module.buildDwarf(self, architecture, compiler, dictionary, clean):
             raise Exception("Don't know how to build binary with dwarf")
 
+    def signBinary(self, binary_path):
+        if sys.platform.startswith("darwin"):
+            codesign_cmd = "codesign --force --sign lldb_codesign %s" % (binary_path)
+            call(codesign_cmd, shell=True)
+
     def findBuiltClang(self):
         """Tries to find and use Clang from the build directory as the compiler (instead of the system compiler)."""
         paths_to_try = [





More information about the lldb-commits mailing list