def add_arguments(self, *, parser):  # noqa: D102
        # only added so that package selection arguments can be used
        # which use the build directory to store state information
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')

        add_packages_arguments(parser)

        parser.add_argument(
            '--topological-order',
            '-t',
            action='store_true',
            default=False,
            help='Order output based on topological ordering (breadth-first)')

        group = parser.add_mutually_exclusive_group()
        group.add_argument(
            '--names-only',
            '-n',
            action='store_true',
            default=False,
            help='Output only the name of each package but not the path')
        group.add_argument(
            '--paths-only',
            '-p',
            action='store_true',
            default=False,
            help='Output only the path of each package but not the name')
Exemple #2
0
    def add_arguments(self, *, parser):  # noqa: D102
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')
        parser.add_argument(
            '--install-base',
            default='install',
            help='The base path for all install prefixes (default: install)')
        parser.add_argument(
            '--merge-install',
            action='store_true',
            help='Merge all install prefixes into a single location')
        parser.add_argument(
            '--symlink-install',
            action='store_true',
            help='Use symlinks instead of copying files where possible')
        parser.add_argument(
            '--test-result-base',
            help='The base path for all test results (default: --build-base)')
        parser.add_argument(
            '--continue-on-error',
            action='store_true',
            help='Continue other packages when a package fails to build '
            '(packages recursively depending on the failed package are '
            'skipped)')
        add_executor_arguments(parser)
        add_event_handler_arguments(parser)

        add_packages_arguments(parser)

        decorated_parser = DestinationCollectorDecorator(parser)
        add_task_arguments(decorated_parser, 'colcon_core.task.build')
        self.task_argument_destinations = decorated_parser.get_destinations()
Exemple #3
0
    def add_arguments(self, *, parser):  # noqa: D102
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')
        parser.add_argument(
            '--install-base',
            default='install',
            help='The base path for all install prefixes (default: install)')
        parser.add_argument(
            '--merge-install',
            action='store_true',
            help='Merge all install prefixes into a single location')
        parser.add_argument(
            '--symlink-install',
            action='store_true',
            help='Use symlinks instead of copying files where possible')
        parser.add_argument(
            '--test-result-base',
            help='The base path for all test results (default: --build-base)')
        add_executor_arguments(parser)
        add_event_handler_arguments(parser)

        add_packages_arguments(parser)

        decorated_parser = DestinationCollectorDecorator(parser)
        add_task_arguments(decorated_parser, 'build')
        self.task_argument_destinations = decorated_parser.get_destinations()
Exemple #4
0
    def add_arguments(self, *, parser):  # noqa: D102
        parser.add_argument(
            '--base-select', nargs='*', metavar='BASE_NAME',
            default=sorted(get_base_handler_extensions().keys()),
            help='Select base names to clean in workspace '
                 '(default: [build, install, log, test_result])')

        parser.add_argument(
            '-y', '--yes',
            action='store_true',
            help='Automatic yes to prompts')
        add_base_handler_arguments(parser)
        add_event_handler_arguments(parser)
        add_packages_arguments(parser)
    def add_arguments(self, *, parser):  # noqa: D102
        parser.add_argument(
            'package_names',
            nargs='*',
            metavar='PKG_NAME',
            help='Only show the information of a subset of packages')

        # only added so that package selection arguments can be used
        # which use the build directory to store state information
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')

        add_packages_arguments(parser)
Exemple #6
0
    def add_arguments(self, *, parser):  # noqa: D102
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')
        parser.add_argument(
            '--install-base',
            default='install',
            help='The base path for all install prefixes (default: install)')
        parser.add_argument(
            '--merge-install',
            action='store_true',
            help='Merge all install prefixes into a single location')
        parser.add_argument(
            '--test-result-base',
            help='The base path for all test results (default: --build-base)')
        group = parser.add_mutually_exclusive_group()
        group.add_argument(
            '--retest-until-fail',
            type=int, default=0, metavar='N',
            help='Rerun tests up to N times if they pass')
        group.add_argument(
            '--retest-until-pass',
            type=int, default=0, metavar='N',
            help='Rerun failing tests up to N times')
        parser.add_argument(
            '--abort-on-error',
            action='store_true',
            help='Abort after the first package with any errors (failing '
                 'tests are not considered errors in this context)')
        parser.add_argument(
            '--return-code-on-test-failure',
            action='store_true',
            help='Use a non-zero return code to indicate any test failure')
        add_executor_arguments(parser)
        add_event_handler_arguments(parser)

        add_packages_arguments(parser)

        decorated_parser = DestinationCollectorDecorator(parser)
        add_task_arguments(decorated_parser, 'colcon_core.task.test')
        self.task_argument_destinations = decorated_parser.get_destinations()
        self.task_argument_destinations['retest-until-pass'] = \
            'retest_until_pass'
        self.task_argument_destinations['retest-until-fail'] = \
            'retest_until_fail'
Exemple #7
0
    def add_arguments(self, *, parser):  # noqa: D102
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')

        parser.add_argument(
            '--ignore-dependencies',
            action='store_true',
            help='Ignore dependencies when capturing caches (default: false)')

        add_executor_arguments(parser)
        add_event_handler_arguments(parser)
        add_packages_arguments(parser)

        decorated_parser = DestinationCollectorDecorator(parser)
        add_task_arguments(decorated_parser, 'colcon_cache.task.lock')
        self.task_argument_destinations = decorated_parser.get_destinations()
Exemple #8
0
    def add_arguments(self, *, parser):  # noqa: D102
        if sys.version_info < (3, 8):
            # TODO(sloretz) remove when minimum supported Python version is 3.8
            parser.register('action', 'extend', _ExtendAction)
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')
        parser.add_argument(
            '--install-base',
            default='install',
            help='The base path for all install prefixes (default: install)')
        parser.add_argument(
            '--merge-install',
            action='store_true',
            help='Merge all install prefixes into a single location')
        parser.add_argument(
            '--symlink-install',
            action='store_true',
            help='Use symlinks instead of copying files where possible')
        parser.add_argument(
            '--test-result-base',
            help='The base path for all test results (default: --build-base)')
        parser.add_argument(
            '--continue-on-error',
            action='store_true',
            help='Continue other packages when a package fails to build '
            '(packages recursively depending on the failed package are '
            'skipped)')
        parser.add_argument(
            '--allow-overriding',
            action='extend',
            default=[],
            metavar='PKG_NAME',
            nargs='+',
            help='Allow building packages that exist in underlay workspaces')
        add_executor_arguments(parser)
        add_event_handler_arguments(parser)

        add_packages_arguments(parser)

        decorated_parser = DestinationCollectorDecorator(parser)
        add_task_arguments(decorated_parser, 'colcon_core.task.build')
        self.task_argument_destinations = decorated_parser.get_destinations()
    def add_arguments(self, *, parser):  # noqa: D102
        # only added so that package selection arguments can be used
        # which use the build directory to store state information
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')

        add_packages_arguments(parser)

        group = parser.add_mutually_exclusive_group()
        group.add_argument(
            '--dot',
            action='store_true',
            default=False,
            help='Output topological graph in DOT '
            '(e.g. pass the output to dot: ` | dot -Tpng -o graph.png`), '
            'legend: blue=build, red=run, tan=test, dashed=indirect')

        group.add_argument(
            '--density',
            action='store_true',
            default=False,
            help='Output density of the graph (only without --dot)')

        parser.add_argument('--legend',
                            action='store_true',
                            default=False,
                            help='Output legend for the graph')

        parser.add_argument(
            '--dot-cluster',
            action='store_true',
            default=False,
            help='Cluster packages by their filesystem path (only affects '
            '--dot)')
        parser.add_argument(
            '--dot-include-skipped',
            action='store_true',
            default=False,
            help='Also output skipped packages (only affects --dot)')
Exemple #10
0
 def add_arguments(self, *, parser):  # noqa: D102
     parser.add_argument(
         '--build-base',
         default='build',
         help='The base path for all build directories (default: build)'
     )
     parser.add_argument(
         '--lcov-base',
         default='lcov',
         help='The path for lcov artifacts (default: lcov)'
     )
     parser.add_argument(
         '--lcov-config-file',
         default=Path(__file__).parent / 'configuration' / 'lcovrc',
         help='The path to the lcov configuration (default: configuration/lcovrc)'
     )
     parser.add_argument(
         '--verbose',
         action='store_true',
         help='Show coverage rates for individual packages'
     )
     parser.add_argument(
         '--initial',
         action='store_true',
         help='Generate baseline (zero) coverage. This option is meant to be used before '
              'running `colcon test`'
     )
     parser.add_argument(
         '--zero-counters',
         action='store_true',
         help='Zero the coverage counters'
     )
     parser.add_argument(
         '--filter',
         nargs='*',
         help='Remove files matching FILTER from total coverage (e.g. "*/test/*")'
     )
     add_packages_arguments(parser)
     add_log_level_argument(parser)
     add_executor_arguments(parser)
     add_event_handler_arguments(parser)
Exemple #11
0
 def add_arguments(self, *, parser):  # noqa: D102
     parser.add_argument(
         '--build-base',
         default='build',
         help=
         'The base path for all build directories (default: %(default)s)',
     )
     parser.add_argument(
         '--coveragepy-base',
         default='coveragepy',
         help=
         'The path for coveragepy artifacts and outputs (default: %(default)s)',
     )
     parser.add_argument(
         '--coverage-report-args',
         nargs='*',
         metavar='*',
         type=str.lstrip,
         help="Pass arguments to 'coverage report'. Arguments matching "
         'other options must be prefixed by a space, '
         'e.g. --coverage-report-args " --help"',
     )
     parser.add_argument(
         '--coverage-html-args',
         nargs='*',
         metavar='*',
         type=str.lstrip,
         help="Pass arguments to 'coverage html'. Arguments matching "
         'other options must be prefixed by a space, '
         'e.g. --coverage-html-args " --help"',
     )
     parser.add_argument(
         '--verbose',
         action='store_true',
         help='Show coverage results for individual packages and overall',
     )
     add_packages_arguments(parser)
     add_log_level_argument(parser)
     add_executor_arguments(parser)
     add_event_handler_arguments(parser)
    def add_arguments(self, *, parser):  # noqa: D102
        # only added so that package selection arguments can be used
        # which use the build directory to store state information
        parser.add_argument(
            '--build-base',
            default='build',
            help='The base path for all build directories (default: build)')

        add_packages_arguments(parser)

        parser.add_argument(
            '--topological-order',
            '-t',
            action='store_true',
            default=False,
            help='Order output based on topological ordering (breadth-first)')

        group = parser.add_mutually_exclusive_group()
        group.add_argument(
            '--names-only',
            '-n',
            action='store_true',
            default=False,
            help='Output only the name of each package but not the path')
        group.add_argument(
            '--paths-only',
            '-p',
            action='store_true',
            default=False,
            help='Output only the path of each package but not the name')
        group.add_argument('--topological-graph',
                           '-g',
                           action='store_true',
                           default=False,
                           help='Output topological graph in ASCII '
                           '(implies --topological-order)')
        group.add_argument(
            '--topological-graph-dot',
            action='store_true',
            default=False,
            help='Output topological graph in DOT '
            '(e.g. pass the output to dot: ` | dot -Tpng -o graph.png`), '
            'legend: blue=build, red=run, tan=test, dashed=indirect')

        parser.add_argument(
            '--topological-graph-density',
            action='store_true',
            default=False,
            help='Output density for topological graph (only affects '
            '--topological-graph)')

        parser.add_argument(
            '--topological-graph-legend',
            action='store_true',
            default=False,
            help='Output legend for topological graph (only affects '
            '--topological-graph)')
        parser.add_argument('--topological-graph-dot-cluster',
                            action='store_true',
                            default=False,
                            help='Cluster packages by their filesystem path '
                            '(only affects --topological-graph-dot)')