From b980f8482f1e67d83964a48db61c63bc40b2732f Mon Sep 17 00:00:00 2001 From: Matt Condino Date: Mon, 4 Nov 2024 09:44:25 -0800 Subject: [PATCH] support addtl lcov_result args --- colcon_lcov_result/task/lcov.py | 2 ++ colcon_lcov_result/verb/lcov_result.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/colcon_lcov_result/task/lcov.py b/colcon_lcov_result/task/lcov.py index 77b902d..63476ea 100644 --- a/colcon_lcov_result/task/lcov.py +++ b/colcon_lcov_result/task/lcov.py @@ -71,6 +71,8 @@ async def lcov_capture(self, *, additional_hooks=None): # noqa: D102 '--output-file', str(output_file), '--config-file', str(self.context.args.lcov_config_file)] cmd.extend(additional_args) + if args.lcov_args: + cmd.extend(args.lcov_args) rc = await run( self.context, diff --git a/colcon_lcov_result/verb/lcov_result.py b/colcon_lcov_result/verb/lcov_result.py index 971595a..f8872ab 100644 --- a/colcon_lcov_result/verb/lcov_result.py +++ b/colcon_lcov_result/verb/lcov_result.py @@ -76,6 +76,12 @@ def add_arguments(self, *, parser): # noqa: D102 nargs='*', help='Remove files matching FILTER from total coverage (e.g. "*/test/*")' ) + parser.add_argument( + '--lcov-args', + nargs='*', + help='Additional arguments to pass to lcov' + ) + add_packages_arguments(parser) add_log_level_argument(parser) add_executor_arguments(parser)