mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-11 15:50:56 +00:00
Refactor tests
Organize tests into subdirectories and use a new makefile that scans .sby files and allows selecting tests by mode, engine, solver and/or subdirectory. Automatically skips tests that use engines/solvers that are not found in the PATH. See `cd tests; make help` for a description of supported make targets.
This commit is contained in:
parent
6daa434d85
commit
8da6f07cb3
60 changed files with 328 additions and 101 deletions
43
tests/junit/junit_cover.sby
Normal file
43
tests/junit/junit_cover.sby
Normal file
|
@ -0,0 +1,43 @@
|
|||
[tasks]
|
||||
pass
|
||||
uncovered fail
|
||||
assert fail
|
||||
preunsat
|
||||
|
||||
[options]
|
||||
mode cover
|
||||
depth 1
|
||||
|
||||
pass: expect pass
|
||||
fail: expect fail
|
||||
preunsat: expect fail
|
||||
|
||||
[engines]
|
||||
smtbmc boolector
|
||||
|
||||
[script]
|
||||
uncovered: read -define FAIL
|
||||
assert: read -define FAIL_ASSERT
|
||||
preunsat: read -define PREUNSAT
|
||||
read -sv test.sv
|
||||
prep -top top
|
||||
|
||||
[file test.sv]
|
||||
module test(input foo);
|
||||
`ifdef PREUNSAT
|
||||
always @* assume(!foo);
|
||||
`endif
|
||||
always @* cover(foo);
|
||||
`ifdef FAIL
|
||||
always @* cover(!foo);
|
||||
`endif
|
||||
`ifdef FAIL_ASSERT
|
||||
always @* assert(!foo);
|
||||
`endif
|
||||
endmodule
|
||||
|
||||
module top();
|
||||
test test_i (
|
||||
.foo(1'b1)
|
||||
);
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue