Author: Jonas Devlieghere Date: 2024-01-26T20:37:44-08:00 New Revision: 75952873036fc9989fcf12c526d1a2deaeef596a
URL: https://github.com/llvm/llvm-project/commit/75952873036fc9989fcf12c526d1a2deaeef596a DIFF: https://github.com/llvm/llvm-project/commit/75952873036fc9989fcf12c526d1a2deaeef596a.diff LOG: [lldb] Remove obsolete signBinary helper (#79656) On Darwin, the Makefile already (ad-hoc) signs everything it builds. There's also no need to use lldb_codesign for this. Added: Modified: lldb/packages/Python/lldbsuite/test/dotest.py lldb/packages/Python/lldbsuite/test/dotest_args.py lldb/packages/Python/lldbsuite/test/lldbtest.py lldb/test/API/CMakeLists.txt lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py lldb/test/API/api/multiple-targets/TestMultipleTargets.py lldb/test/API/api/multithreaded/TestMultithreaded.py Removed: ################################################################################ diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index a639714480cf4eb..4393e0caacaab88 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -442,8 +442,6 @@ def parseOptionsAndInitTestdirs(): os.path.realpath(os.path.abspath(x)) for x in args.args ] - lldbtest_config.codesign_identity = args.codesign_identity - def registerFaulthandler(): try: diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py index 70a65078f1d3a88..e4de786ec054894 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest_args.py +++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -217,12 +217,6 @@ def create_parser(): action="store_true", help="Leave logs/traces even for successful test runs (useful for creating reference log files during debugging.)", ) - group.add_argument( - "--codesign-identity", - metavar="Codesigning identity", - default="lldb_codesign", - help="The codesigning identity to use", - ) group.add_argument( "--build-dir", dest="test_build_dir", diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 3abc713398490e7..d944b09cbcc4720 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1543,14 +1543,6 @@ def buildProgram(self, sources, exe_name): d = {"CXX_SOURCES": sources, "EXE": exe_name} self.build(dictionary=d) - def signBinary(self, binary_path): - if sys.platform.startswith("darwin"): - codesign_cmd = 'codesign --force --sign "%s" %s' % ( - lldbtest_config.codesign_identity, - 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 = [ diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt index 0b63ffdb4bd9ae3..4e02112c29e4cd5 100644 --- a/lldb/test/API/CMakeLists.txt +++ b/lldb/test/API/CMakeLists.txt @@ -98,12 +98,6 @@ if(CMAKE_HOST_APPLE) set(LLDB_FRAMEWORK_DIR ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework) endif() - # Use the same identity for testing - get_property(code_sign_identity_used GLOBAL PROPERTY LLDB_DEBUGSERVER_CODESIGN_IDENTITY) - if(code_sign_identity_used) - list(APPEND LLDB_TEST_COMMON_ARGS_VAR --codesign-identity "${code_sign_identity_used}") - endif() - if(LLDB_USE_SYSTEM_DEBUGSERVER) lldb_find_system_debugserver(system_debugserver_path) if(LLDB_BUILD_FRAMEWORK) diff --git a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py index 77f146f7bcb0389..98f089377363494 100644 --- a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py +++ b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py @@ -18,7 +18,6 @@ def test_sb_command_return_object(self): self.driver_exe = self.getBuildArtifact("command-return-object") self.buildDriver("main.cpp", self.driver_exe) self.addTearDownHook(lambda: os.remove(self.driver_exe)) - self.signBinary(self.driver_exe) if self.TraceOn(): print("Running test %s" % self.driver_exe) diff --git a/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py b/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py index 889784ccc60b634..15b2012eee13b6b 100644 --- a/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py +++ b/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py @@ -24,7 +24,6 @@ def test_multiple_debuggers(self): self.driver_exe = self.getBuildArtifact("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 = self.getBuildArtifact("testprog") self.buildDriver("testprog.cpp", self.inferior_exe) diff --git a/lldb/test/API/api/multiple-targets/TestMultipleTargets.py b/lldb/test/API/api/multiple-targets/TestMultipleTargets.py index 831ce325bcdb52e..4fb9279e978d7b3 100644 --- a/lldb/test/API/api/multiple-targets/TestMultipleTargets.py +++ b/lldb/test/API/api/multiple-targets/TestMultipleTargets.py @@ -24,7 +24,6 @@ def test_multiple_targets(self): self.driver_exe = self.getBuildArtifact("multi-target") self.buildDriver("main.cpp", self.driver_exe) self.addTearDownHook(lambda: os.remove(self.driver_exe)) - self.signBinary(self.driver_exe) # check_call will raise a CalledProcessError if multi-process-driver doesn't return # exit code 0 to indicate success. We can let this exception go - the test harness diff --git a/lldb/test/API/api/multithreaded/TestMultithreaded.py b/lldb/test/API/api/multithreaded/TestMultithreaded.py index 631079b1d1db625..1eeff12da4920d8 100644 --- a/lldb/test/API/api/multithreaded/TestMultithreaded.py +++ b/lldb/test/API/api/multithreaded/TestMultithreaded.py @@ -106,7 +106,6 @@ def build_and_test(self, sources, test_name, args=None): self.addTearDownHook(lambda: os.remove(self.getBuildArtifact(test_name))) test_exe = self.getBuildArtifact(test_name) - self.signBinary(test_exe) exe = [test_exe, self.getBuildArtifact(self.inferior)] env = {self.dylibPath: self.getLLDBLibraryEnvVal()} _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits