Skip to content

Commit

Permalink
Issue#24: Improving cdc_run.log file detection.
Browse files Browse the repository at this point in the history
Issue#24:  Improving cdc_run.log file detection.
  • Loading branch information
jeremiah-c-leary authored Oct 2, 2023
2 parents 8407d6e + db8bd00 commit 98c91ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions elfws/vendor/mentor_graphics/questa_cdc__cdc_run_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def is_logfile(lFile):
fToolFound = False
for iLineNumber, sLine in enumerate(lFile):
if fToolFound:
if sLine.startswith('log created'):
if sLine.lstrip().startswith('-tool cdc'):
return True
if sLine.startswith('Command : cdc run'):
if sLine.startswith('# Questa Static Verification System'):
fToolFound = True
if iLineNumber == 20:
break
Expand Down
3 changes: 1 addition & 2 deletions tests/vendor/mentor_graphics/questa_cdc/test_cdc_run_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ def test_is_logfile(self):
lLogFile.append('# Version 2022.1_2')
lLogFile.append('')
lLogFile.append('')
lLogFile.append('Command : cdc run')
lLogFile.append(' -tool cdc')
lLogFile.append('')
lLogFile.append('')
lLogFile.append('log created Sun Sep')
lLogFile.append('')

self.assertTrue(tool.is_logfile(lLogFile))
Expand Down

0 comments on commit 98c91ea

Please sign in to comment.