@@ -22,34 +22,37 @@ logger -check-expected
2222
2323# raise_error with int exits with status
2424design -load read
25+ setattr -mod -unset raise_error def other
26+ dump
2527bugpoint -suffix error -yosys ../../yosys -command raise_error -expect-return 7
2628select -assert-mod-count 1 =*
2729select -assert-mod-count 1 top
2830
2931# raise_error -always still uses 'raise_error' attribute if possible
3032design -load read
33+ setattr -mod -unset raise_error def other
3134bugpoint -suffix error -yosys ../../yosys -command "raise_error -always" -expect-return 7
3235select -assert-mod-count 1 =*
3336select -assert-mod-count 1 top
3437
3538# raise_error with string prints message and exits with 1
3639design -load read
37- rename top abc
40+ setattr -mod -unset raise_error top def
3841bugpoint -suffix error -yosys ../../yosys -command raise_error -grep "help me" -expect-return 1
3942select -assert-mod-count 1 =*
4043select -assert-mod-count 1 other
4144
4245# raise_error with no value exits with 1
4346design -load read
44- rename def zzy
47+ setattr -mod -unset raise_error top
4548delete other
4649bugpoint -suffix error -yosys ../../yosys -command raise_error -expect-return 1
4750select -assert-mod-count 1 =*
48- select -assert-mod-count 1 zzy
51+ select -assert-mod-count 1 def
4952
5053# raise_error -stderr prints to stderr and exits with 1
5154design -load read
52- rename top abc
55+ setattr -mod -unset raise_error top def
5356bugpoint -suffix error -yosys ../../yosys -command "raise_error -stderr" -err-grep "help me" -expect-return 1
5457select -assert-mod-count 1 =*
5558select -assert-mod-count 1 other
0 commit comments