[Lldb-commits] [lldb] [lldb] Remove obsolete signBinary helper (PR #79656)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 26 14:09:35 PST 2024
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/79656
On Darwin, the Makefile already (ad-hoc) signs everything it builds. There's also no need to use lldb_codesign for this.
>From 80d68ab889989ddae906af3b2042158a12a0ca46 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Fri, 26 Jan 2024 14:02:16 -0800
Subject: [PATCH] [lldb] Remove obsolote signBinary helper
On Darwin, the Makefile already (ad-hoc) signs everything it builds.
There's also no need to use lldb_codesign for this.
---
lldb/packages/Python/lldbsuite/test/dotest.py | 2 --
lldb/packages/Python/lldbsuite/test/dotest_args.py | 6 ------
lldb/packages/Python/lldbsuite/test/lldbtest.py | 8 --------
lldb/test/API/CMakeLists.txt | 6 ------
.../command-return-object/TestSBCommandReturnObject.py | 1 -
.../API/api/multiple-debuggers/TestMultipleDebuggers.py | 1 -
lldb/test/API/api/multiple-targets/TestMultipleTargets.py | 1 -
lldb/test/API/api/multithreaded/TestMultithreaded.py | 1 -
8 files changed, 26 deletions(-)
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index a639714480cf4e..4393e0caacaab8 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 70a65078f1d3a8..e4de786ec05489 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 3abc713398490e..d944b09cbcc472 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 0b63ffdb4bd9ae..4e02112c29e4cd 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 77f146f7bcb038..98f08937736349 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 889784ccc60b63..15b2012eee13b6 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 831ce325bcdb52..4fb9279e978d7b 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 631079b1d1db62..1eeff12da4920d 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()}
More information about the lldb-commits
mailing list