tasks.py: plumb -v to enable verbose test output

This commit is contained in:
David Anderson 2024-09-09 11:15:43 -07:00
parent 4b6b34e131
commit 1ca4ccff99
1 changed files with 3 additions and 2 deletions

View File

@ -213,7 +213,7 @@ def synth(c, target):
print(f"Wrote bitstream to {bitstream}")
@task
def test(c, target):
def test(c, target, verbose=False):
to_run = []
for target in expand_test_target(target):
out_info, out_sim, out_bsc = ensure_build_dirs(target, "info", "sim", "bsc")
@ -227,7 +227,8 @@ def test(c, target):
testdata_tgt = testdata_tgt.relative_to(out_sim, walk_up=True)
testdata.unlink(missing_ok=True)
testdata.symlink_to(testdata_tgt, target_is_directory=True)
to_run.append((out_sim, f"./TB -V {target.stem}.vcd"))
cmd = f"./TB -V {target.stem}.vcd {'+v' if verbose else ''}"
to_run.append((out_sim, cmd))
for d, cmd in to_run:
print("")
with c.cd(d):