Skip to content

Commit

Permalink
Fixes #924
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsAsplund committed Feb 25, 2024
1 parent c16718d commit 9d3ea9e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vunit/sim_if/ghdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ def merge_coverage(self, file_name, args=None):
"""
Merge coverage from all test cases
"""
output_dir = file_name
output_dir = Path(file_name)
output_dir.mkdir(parents=True, exist_ok=True)

# Loop over each .gcda output folder and merge them two at a time
first_input = True
Expand All @@ -400,8 +401,8 @@ def merge_coverage(self, file_name, args=None):
"gcov-tool",
"merge",
"-o",
output_dir,
coverage_dir if first_input else output_dir,
str(output_dir),
coverage_dir if first_input else str(output_dir),
coverage_dir,
]
subprocess.call(merge_command)
Expand All @@ -410,8 +411,7 @@ def merge_coverage(self, file_name, args=None):
LOGGER.warning("Missing coverage directory: %s", coverage_dir)

# Find actual output path of the .gcda files (they are deep in hierarchy)
dir_path = Path(output_dir)
gcda_dirs = {x.parent for x in dir_path.glob("**/*.gcda")}
gcda_dirs = {x.parent for x in output_dir.glob("**/*.gcda")}
assert len(gcda_dirs) == 1, "Expected exactly one folder with gcda files"
gcda_dir = gcda_dirs.pop()

Expand Down

0 comments on commit 9d3ea9e

Please sign in to comment.