compile all tests before running them, so the outputs are grouped

This commit is contained in:
David Anderson 2024-09-07 12:15:28 -07:00
parent 6e84e9c689
commit fc4b212139
1 changed files with 6 additions and 2 deletions

View File

@ -214,6 +214,7 @@ def synth(c, target):
@task
def test(c, target):
to_run = []
for target in expand_test_target(target):
out_info, out_sim, out_bsc = ensure_build_dirs(target, "info", "sim", "bsc")
libdirs = bluespec_libdirs(target, "sim")
@ -226,8 +227,11 @@ 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)
with c.cd(out_sim):
c.run(f"./TB -V {target.stem}.vcd")
to_run.append((out_sim, f"./TB -V {target.stem}.vcd"))
for d, cmd in to_run:
print("")
with c.cd(d):
c.run(cmd)
@task
def clean(c):