-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check tool versions at beginning of run
- Loading branch information
Martin Troiber
committed
Sep 27, 2023
1 parent
c729092
commit afd94bb
Showing
4 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import siliconcompiler | ||
from siliconcompiler.tools.surelog import parse | ||
|
||
import pytest | ||
|
||
|
||
def test_version_early(capfd): | ||
chip = siliconcompiler.Chip('test') | ||
chip.set('input', 'rtl', 'verilog', 'fake.v') | ||
chip.load_target('freepdk45_demo') | ||
chip.set('option', 'mode', 'asic') | ||
flow = 'test' | ||
chip.set('option', 'flow', flow) | ||
chip.node(flow, 'import', parse) | ||
chip.set('tool', 'surelog', 'version', '==100.0') | ||
|
||
with pytest.raises(siliconcompiler.SiliconCompilerError, | ||
match='Pre-run version check failed. Please update your tools.'): | ||
chip.run() | ||
# Fail if 'syn' step is run | ||
out, _ = capfd.readouterr() | ||
assert "Halting step 'import'" in out | ||
assert "Finished task in" not in out |