3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-11 00:13:33 +00:00

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.
This commit is contained in:
Jannis Harder 2023-11-30 16:46:20 +01:00
parent aa2a96d7c9
commit eeee1a1ec5

View file

@ -470,6 +470,7 @@ class Smtbmc(tl.process.Process):
[
"yosys-smtbmc",
"--incremental",
"--noprogress",
*App.smtbmc_options,
str(smt2_model),
],
@ -481,7 +482,11 @@ class Smtbmc(tl.process.Process):
async def on_run(self) -> None:
def output_handler(event: tl.process.StdoutEvent):
result = json.loads(event.output)
line = event.output.strip()
if line.startswith('{'):
result = json.loads(event.output)
else:
result = dict(msg=line)
tl.log_debug(f"smtbmc > {result!r}")
if "err" in result:
exception = tl.logging.LoggedError(