mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-21 04:10:27 +00:00
Tests for --keep-going
This also changes the test Makefile to run `.check.py` files after running the corresponding `.sby` file to allow more precise testing of the keep going feature.
This commit is contained in:
parent
7824460e27
commit
2d3d96478a
11 changed files with 182 additions and 1 deletions
18
tests/keepgoing_same_step.check.py
Normal file
18
tests/keepgoing_same_step.check.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from check_output import *
|
||||
|
||||
task = "keepgoing_same_step"
|
||||
src = "keepgoing_same_step.sv"
|
||||
|
||||
assert_a = line_ref(task, src, "assert(a)")
|
||||
assert_not_a = line_ref(task, src, "assert(!a)")
|
||||
assert_0 = line_ref(task, src, "assert(0)")
|
||||
|
||||
log = open(task + "/logfile.txt").read()
|
||||
log_per_trace = log.split("Writing trace to VCD file")[:-1]
|
||||
|
||||
assert len(log_per_trace) == 2
|
||||
|
||||
assert re.search(r"Assert failed in test: %s \(.*\)$" % assert_a, log, re.M)
|
||||
assert re.search(r"Assert failed in test: %s \(.*\)$" % assert_not_a, log, re.M)
|
||||
assert re.search(r"Assert failed in test: %s \(.*\)$" % assert_0, log_per_trace[0], re.M)
|
||||
assert re.search(r"Assert failed in test: %s \(.*\) \[failed before\]$" % assert_0, log_per_trace[1], re.M)
|
Loading…
Add table
Add a link
Reference in a new issue