3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-06 19:21:23 +00:00

raise_error: Add -always

This commit is contained in:
Krystine Sherwin 2025-08-02 14:47:52 +12:00
parent a18acaca82
commit 895dfd963f
No known key found for this signature in database
2 changed files with 45 additions and 14 deletions

View file

@ -14,6 +14,12 @@ EOF
select -assert-mod-count 3 =*
design -stash read
# empty design does not raise_error
design -reset
logger -expect log "'raise_error' attribute not found" 1
raise_error
logger -check-expected
# raise_error with int exits with status
design -load read
bugpoint -suffix error -yosys ../../yosys -command raise_error -expect-return 7
@ -41,3 +47,8 @@ rename top abc
bugpoint -suffix error -yosys ../../yosys -command "raise_error -stderr" -err-grep "help me" -expect-return 1
select -assert-mod-count 1 =*
select -assert-mod-count 1 other
# empty design can raise_error -always
design -reset
bugpoint -suffix error -yosys ../../yosys -command "raise_error -always" -grep "ERROR: No 'raise_error' attribute found" -expect-return 1
bugpoint -suffix error -yosys ../../yosys -command "raise_error -always -stderr" -err-grep "No 'raise_error' attribute found" -expect-return 1