Skip to content

Commit

Permalink
Merge pull request #512 from pStefanNilsson/merge_cover_fix
Browse files Browse the repository at this point in the history
Modified merge_coverage to handle long vcover merge commands.
  • Loading branch information
kraigher committed Jun 12, 2019
2 parents 65e441c + 33d2dad commit 70ff2ba
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions vunit/modelsim_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,14 @@ def merge_coverage(self, file_name, args=None):
if args is None:
args = []

vcover_cmd = [join(self._prefix, 'vcover'), 'merge'] + args + [file_name]

for coverage_file in self._coverage_files:
if file_exists(coverage_file):
vcover_cmd.append(coverage_file)
else:
LOGGER.warning("Missing coverage file: %s", coverage_file)
coverage_files = join(self._output_path, 'coverage_files.txt')
vcover_cmd = [join(self._prefix, 'vcover'), 'merge', '-inputs'] + [coverage_files] + args + [file_name]
with open(coverage_files, "w") as fptr:
for coverage_file in self._coverage_files:
if file_exists(coverage_file):
fptr.write(str(coverage_file) + "\n")
else:
LOGGER.warning("Missing coverage file: %s", coverage_file)

print("Merging coverage files into %s..." % file_name)
vcover_merge_process = Process(vcover_cmd,
Expand Down

0 comments on commit 70ff2ba

Please sign in to comment.