beanz created this revision. beanz added reviewers: zturner, tfiala. beanz added a subscriber: lldb-commits. Herald added a subscriber: mgorny.
Not everyone names their code sign identity "lldb_codesign", so it is nice to allow this to be overridden. https://reviews.llvm.org/D25714 Files: packages/Python/lldbsuite/test/dotest.py packages/Python/lldbsuite/test/dotest_args.py packages/Python/lldbsuite/test/lldbtest.py test/CMakeLists.txt Index: test/CMakeLists.txt =================================================================== --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -79,6 +79,10 @@ 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}" Index: packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- packages/Python/lldbsuite/test/lldbtest.py +++ packages/Python/lldbsuite/test/lldbtest.py @@ -1543,8 +1543,8 @@ 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" % ( + os.environ['LLDB_CODESIGN_IDENTITY'], binary_path) call(codesign_cmd, shell=True) def findBuiltClang(self): Index: packages/Python/lldbsuite/test/dotest_args.py =================================================================== --- packages/Python/lldbsuite/test/dotest_args.py +++ packages/Python/lldbsuite/test/dotest_args.py @@ -151,6 +151,11 @@ 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') Index: packages/Python/lldbsuite/test/dotest.py =================================================================== --- packages/Python/lldbsuite/test/dotest.py +++ packages/Python/lldbsuite/test/dotest.py @@ -481,6 +481,8 @@ # Shut off multiprocessing mode when test directories are specified. configuration.no_multiprocess_test_runner = True + os.environ['LLDB_CODESIGN_IDENTITY'] = args.codesign_identity + #print("testdirs:", testdirs)
Index: test/CMakeLists.txt =================================================================== --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -79,6 +79,10 @@ 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}" Index: packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- packages/Python/lldbsuite/test/lldbtest.py +++ packages/Python/lldbsuite/test/lldbtest.py @@ -1543,8 +1543,8 @@ 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" % ( + os.environ['LLDB_CODESIGN_IDENTITY'], binary_path) call(codesign_cmd, shell=True) def findBuiltClang(self): Index: packages/Python/lldbsuite/test/dotest_args.py =================================================================== --- packages/Python/lldbsuite/test/dotest_args.py +++ packages/Python/lldbsuite/test/dotest_args.py @@ -151,6 +151,11 @@ 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') Index: packages/Python/lldbsuite/test/dotest.py =================================================================== --- packages/Python/lldbsuite/test/dotest.py +++ packages/Python/lldbsuite/test/dotest.py @@ -481,6 +481,8 @@ # Shut off multiprocessing mode when test directories are specified. configuration.no_multiprocess_test_runner = True + os.environ['LLDB_CODESIGN_IDENTITY'] = args.codesign_identity + #print("testdirs:", testdirs)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits