]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script: add option for debug build 53855/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 6 Oct 2023 00:11:29 +0000 (20:11 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 6 Oct 2023 16:06:01 +0000 (12:06 -0400)
See: https://github.com/ceph/ceph-build/pull/2167

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/script/ptl-tool.py

index 110fa9e3af9fd91858a328ad621f4f3b21283482..095fceb41fc0445c0e2647a2f5c5287d19c0dfeb 100755 (executable)
@@ -250,6 +250,8 @@ def get_credits(session, pr, pr_req):
 def build_branch(args):
     base = args.base
     branch = datetime.datetime.utcnow().strftime(args.branch).format(user=USER)
+    if args.debug_build:
+        branch = branch + "-debug"
     label = args.label
     merge_branch_name = args.merge_branch_name
     if merge_branch_name is False:
@@ -389,6 +391,7 @@ def main():
     else:
         argv = sys.argv[1:]
     parser.add_argument('--branch', dest='branch', action='store', default=default_branch, help='branch to create ("HEAD" leaves HEAD detached; i.e. no branch is made)')
+    parser.add_argument('--debug-build', dest='debug_build', action='store_true', help='append -debug to branch name prompting ceph-build to build with CMAKE_BUILD_TYPE=Debug')
     parser.add_argument('--merge-branch-name', dest='merge_branch_name', action='store', default=False, help='name of the branch for merge messages')
     parser.add_argument('--base', dest='base', action='store', default=default_base, help='base for branch')
     parser.add_argument('--base-path', dest='base_path', action='store', default=BASE_PATH, help='base for branch')