Skip to content

Commit eeee1a1

Browse files
committed
tools/cexenum: Avoid buffering smtbmc's --progress stderr output
We were discarding that output anyway and before YosysHQ/mau#5 this could lead to the mau internal `stderr.readline()` failing.
1 parent aa2a96d commit eeee1a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/cexenum/cexenum.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ def __init__(self, smt2_model: Path):
470470
[
471471
"yosys-smtbmc",
472472
"--incremental",
473+
"--noprogress",
473474
*App.smtbmc_options,
474475
str(smt2_model),
475476
],
@@ -481,7 +482,11 @@ def __init__(self, smt2_model: Path):
481482

482483
async def on_run(self) -> None:
483484
def output_handler(event: tl.process.StdoutEvent):
484-
result = json.loads(event.output)
485+
line = event.output.strip()
486+
if line.startswith('{'):
487+
result = json.loads(event.output)
488+
else:
489+
result = dict(msg=line)
485490
tl.log_debug(f"smtbmc > {result!r}")
486491
if "err" in result:
487492
exception = tl.logging.LoggedError(

0 commit comments

Comments
 (0)