twister: Fix exception when running coverage

Fix an exception when running coverage using gcov or llvm-cov.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/66897

Signed-off-by: Keith Short <keithshort@google.com>
This commit is contained in:
Keith Short 2023-12-22 10:40:38 -07:00 committed by Anas Nashif
parent 8ad22f7df4
commit f6a7895496
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ def run_coverage(testplan, options):
logger.info("Generating coverage files...")
logger.info(f"Using gcov tool: {options.gcov_tool}")
coverage_tool = CoverageTool.factory(options.coverage_tool)
coverage_tool.gcov_tool = options.gcov_tool
coverage_tool.gcov_tool = str(options.gcov_tool)
coverage_tool.base_dir = os.path.abspath(options.coverage_basedir)
# Apply output format default
if options.coverage_formats is not None: