diff options
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 2 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest_args.py | 5 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 4 | ||||
-rw-r--r-- | lldb/test/CMakeLists.txt | 4 |
4 files changed, 13 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 4c19a2a2eb9..20dca86625e 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -481,6 +481,8 @@ def parseOptionsAndInitTestdirs(): # Shut off multiprocessing mode when test directories are specified. configuration.no_multiprocess_test_runner = True + lldbtest_config.codesign_identity = args.codesign_identity + #print("testdirs:", testdirs) diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py index 804fda4982a..fc896d53c0b 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest_args.py +++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -151,6 +151,11 @@ def create_parser(): dest='log_success', 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') # Configuration options group = parser.add_argument_group('Remote platform options') diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 104cb619885..a79e06fdbdd 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1543,8 +1543,8 @@ class Base(unittest2.TestCase): def signBinary(self, binary_path): if sys.platform.startswith("darwin"): - codesign_cmd = "codesign --force --sign lldb_codesign %s" % ( - binary_path) + codesign_cmd = "codesign --force --sign \"%s\" %s" % ( + lldbtest_config.codesign_identity, binary_path) call(codesign_cmd, shell=True) def findBuiltClang(self): diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index b050175aea5..2f679cded8a 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -85,6 +85,10 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) endif() endif() +if(LLDB_CODESIGN_IDENTITY) + list(APPEND LLDB_TEST_COMMON_ARGS --codesign-identity "${LLDB_CODESIGN_IDENTITY}") +endif() + add_python_test_target(check-lldb-single ${LLDB_SOURCE_DIR}/test/dotest.py "--no-multiprocess;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}" |