[Lldb-commits] [PATCH] D25714: [Test Suite] Allow overriding codesign identity

Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 21 15:23:35 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL284893: [Test Suite] Allow overriding codesign identity (authored by cbieneman).

Changed prior to commit:
  https://reviews.llvm.org/D25714?vs=75057&id=75499#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D25714

Files:
  lldb/trunk/packages/Python/lldbsuite/test/dotest.py
  lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
  lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
  lldb/trunk/test/CMakeLists.txt


Index: lldb/trunk/test/CMakeLists.txt
===================================================================
--- lldb/trunk/test/CMakeLists.txt
+++ lldb/trunk/test/CMakeLists.txt
@@ -85,6 +85,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: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
+++ lldb/trunk/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: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/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" % (
+                lldbtest_config.codesign_identity, binary_path)
             call(codesign_cmd, shell=True)
 
     def findBuiltClang(self):
Index: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py
+++ lldb/trunk/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
 
+    lldbtest_config.codesign_identity = args.codesign_identity
+
     #print("testdirs:", testdirs)
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25714.75499.patch
Type: text/x-patch
Size: 2402 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161021/1881578d/attachment.bin>


More information about the lldb-commits mailing list