Index: lldb.xcodeproj/project.pbxproj =================================================================== --- lldb.xcodeproj/project.pbxproj +++ lldb.xcodeproj/project.pbxproj @@ -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; Index: test/api/multiple-debuggers/TestMultipleDebuggers.py =================================================================== --- test/api/multiple-debuggers/TestMultipleDebuggers.py +++ test/api/multiple-debuggers/TestMultipleDebuggers.py @@ -26,6 +26,7 @@ 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) Index: test/api/multithreaded/TestMultithreaded.py =================================================================== --- test/api/multithreaded/TestMultithreaded.py +++ test/api/multithreaded/TestMultithreaded.py @@ -66,7 +66,9 @@ 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(): Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -1422,6 +1422,11 @@ 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 = [