mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-11 05:30:53 +00:00
Merge pull request #5264 from YosysHQ/krys/raise_error_always
raise_error: Add -always
This commit is contained in:
commit
1e58443397
2 changed files with 51 additions and 14 deletions
|
@ -14,12 +14,24 @@ 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
|
||||
select -assert-mod-count 1 =*
|
||||
select -assert-mod-count 1 top
|
||||
|
||||
# raise_error -always still uses 'raise_error' attribute if possible
|
||||
design -load read
|
||||
bugpoint -suffix error -yosys ../../yosys -command "raise_error -always" -expect-return 7
|
||||
select -assert-mod-count 1 =*
|
||||
select -assert-mod-count 1 top
|
||||
|
||||
# raise_error with string prints message and exits with 1
|
||||
design -load read
|
||||
rename top abc
|
||||
|
@ -41,3 +53,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue