aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gdb/gdb_7.0.bb
AgeCommit message ( vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/usr/bin/env python3
#
# Helper script for committing data to git and pushing upstream
#
# Copyright (c) 2017, Intel Corporation.
#
# SPDX-License-Identifier: GPL-2.0-only
#

import argparse
import logging
import os
import re
import sys

# Import oe and bitbake libs
scripts_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(scripts_path, 'lib'))
import scriptpath
scriptpath.add_bitbake_lib_path()
scriptpath.add_oe_lib_path()

from oeqa.utils.git import GitRepo, GitError
from oeqa.utils.metadata import metadata_from_bb
import oeqa.utils.gitarchive as gitarchive

# Setup logging
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
log = logging.getLogger()


def parse_args(argv):
    """Parse command line arguments"""
    parser = argparse.ArgumentParser(
            description="Commit data to git and push upstream",
            formatter_class=argparse.ArgumentDefaultsHelpFormatter)

    parser.add_argument('--debug', '-D', action='store_true',
                        help="Verbose logging")
    parser.add_argument('--git-dir', '-g', required=True,
                        help="Local git directory to use")
    parser.add_argument('--no-create', action='store_true',
                        help="If GIT_DIR is not a valid Git repository, do not "
                             "try to create one")
    parser.add_argument('--bare', action='store_true',
                        help="Initialize a bare repository when creating a "
                             "new one")
    parser.add_argument('--push', '-p', nargs='?', default=False, const=True,
                        help="Push to remote")
    parser.add_argument('--branch-name', '-b',
                        default='{hostname}/{branch}/{machine}',
                        help="Git branch name (pattern) to use")
    parser.add_argument('--no-tag', action='store_true',
                        help="Do not create Git tag")
    parser.add_argument('--tag-name', '-t',
                        default='{hostname}/{branch}/{machine}/{commit_count}-g{commit}/{tag_number}',
                        help="Tag name (pattern) to use")
    parser.add_argument('--commit-msg-subject',
                        default='Results of {branch}:{commit} on {hostname}',
                        help="Subject line (pattern) to use in the commit message")
    parser.add_argument('--commit-msg-body',
                        default='branch: {branch}\ncommit: {commit}\nhostname: {hostname}',
                        help="Commit message body (pattern)")
    parser.add_argument('--tag-msg-subject',
                        default='Test run #{tag_number} of {branch}:{commit} on {hostname}',
                        help="Subject line (pattern) of the tag message")
    parser.add_argument('--tag-msg-body',
                        default='',
                        help="Tag message body (pattern)")
    parser.add_argument('--exclude', action='append', default=[],
                        help="Glob to exclude files from the commit. Relative "
                             "to DATA_DIR. May be specified multiple times")
    parser.add_argument('--notes', nargs=2, action='append', default=[],
                        metavar=('GIT_REF', 'FILE'),
                        help="Add a file as a note under refs/notes/GIT_REF. "
                             "{branch_name} in GIT_REF will be expanded to the "
                             "actual target branch name (specified by "
                             "--branch-name). This option may be specified "
                             "multiple times.")
    parser.add_argument('data_dir', metavar='DATA_DIR',
                        help="Data to commit")
    return parser.parse_args(argv)

def get_nested(d, list_of_keys):
    try:
        for k in list_of_keys:
            d = d[k]
        return d
    except KeyError:
        return ""

def main(argv=None):
    args = parse_args(argv)
    if args.debug:
        log.setLevel(logging.DEBUG)

    try:
        # Get keywords to be used in tag and branch names and messages
        metadata = metadata_from_bb()
        keywords = {'hostname': get_nested(metadata, ['hostname']),
                    'branch': get_nested(metadata, ['layers', 'meta', 'branch']),
                    'commit': get_nested(metadata, ['layers', 'meta', 'commit']),
                    'commit_count': get_nested(metadata, ['layers', 'meta', 'commit_count']),
                    'machine': get_nested(metadata, ['config', 'MACHINE'])}

        gitarchive.gitarchive(args.data_dir, args.git_dir, args.no_create, args.bare,
                              args.commit_msg_subject.strip(), args.commit_msg_body, args.branch_name,
                              args.no_tag, args.tag_name, args.tag_msg_subject, args.tag_msg_body,
                              args.exclude, args.notes, args.push, keywords, log)

    except gitarchive.ArchiveError as err:
        log.error(str(err))
        return 1

    return 0

if __name__ == "__main__":
    sys.exit(main())