Skip to content

Commit

Permalink
Fixes VUnit#924
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsAsplund authored and markuspg committed Sep 4, 2024
1 parent 6655258 commit 4d9aa3d
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 @@ -391,7 +391,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 @@ -401,8 +402,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 @@ -411,8 +412,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 4d9aa3d

Please sign in to comment.