mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-14 13:41:27 +00:00
raise_error: don't rely on module ordering in test
This commit is contained in:
parent
0e11271868
commit
44fd6095bf
1 changed files with 7 additions and 4 deletions
|
@ -22,34 +22,37 @@ logger -check-expected
|
||||||
|
|
||||||
# raise_error with int exits with status
|
# raise_error with int exits with status
|
||||||
design -load read
|
design -load read
|
||||||
|
setattr -mod -unset raise_error def other
|
||||||
|
dump
|
||||||
bugpoint -suffix error -yosys ../../yosys -command raise_error -expect-return 7
|
bugpoint -suffix error -yosys ../../yosys -command raise_error -expect-return 7
|
||||||
select -assert-mod-count 1 =*
|
select -assert-mod-count 1 =*
|
||||||
select -assert-mod-count 1 top
|
select -assert-mod-count 1 top
|
||||||
|
|
||||||
# raise_error -always still uses 'raise_error' attribute if possible
|
# raise_error -always still uses 'raise_error' attribute if possible
|
||||||
design -load read
|
design -load read
|
||||||
|
setattr -mod -unset raise_error def other
|
||||||
bugpoint -suffix error -yosys ../../yosys -command "raise_error -always" -expect-return 7
|
bugpoint -suffix error -yosys ../../yosys -command "raise_error -always" -expect-return 7
|
||||||
select -assert-mod-count 1 =*
|
select -assert-mod-count 1 =*
|
||||||
select -assert-mod-count 1 top
|
select -assert-mod-count 1 top
|
||||||
|
|
||||||
# raise_error with string prints message and exits with 1
|
# raise_error with string prints message and exits with 1
|
||||||
design -load read
|
design -load read
|
||||||
rename top abc
|
setattr -mod -unset raise_error top def
|
||||||
bugpoint -suffix error -yosys ../../yosys -command raise_error -grep "help me" -expect-return 1
|
bugpoint -suffix error -yosys ../../yosys -command raise_error -grep "help me" -expect-return 1
|
||||||
select -assert-mod-count 1 =*
|
select -assert-mod-count 1 =*
|
||||||
select -assert-mod-count 1 other
|
select -assert-mod-count 1 other
|
||||||
|
|
||||||
# raise_error with no value exits with 1
|
# raise_error with no value exits with 1
|
||||||
design -load read
|
design -load read
|
||||||
rename def zzy
|
setattr -mod -unset raise_error top
|
||||||
delete other
|
delete other
|
||||||
bugpoint -suffix error -yosys ../../yosys -command raise_error -expect-return 1
|
bugpoint -suffix error -yosys ../../yosys -command raise_error -expect-return 1
|
||||||
select -assert-mod-count 1 =*
|
select -assert-mod-count 1 =*
|
||||||
select -assert-mod-count 1 zzy
|
select -assert-mod-count 1 def
|
||||||
|
|
||||||
# raise_error -stderr prints to stderr and exits with 1
|
# raise_error -stderr prints to stderr and exits with 1
|
||||||
design -load read
|
design -load read
|
||||||
rename top abc
|
setattr -mod -unset raise_error top def
|
||||||
bugpoint -suffix error -yosys ../../yosys -command "raise_error -stderr" -err-grep "help me" -expect-return 1
|
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 =*
|
||||||
select -assert-mod-count 1 other
|
select -assert-mod-count 1 other
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue