mirror of
https://github.com/YosysHQ/sby.git
synced 2025-07-17 12:06:41 +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:
parent
aa2a96d7c9
commit
eeee1a1ec5
1 changed files with 6 additions and 1 deletions
|
@ -470,6 +470,7 @@ class Smtbmc(tl.process.Process):
|
||||||
[
|
[
|
||||||
"yosys-smtbmc",
|
"yosys-smtbmc",
|
||||||
"--incremental",
|
"--incremental",
|
||||||
|
"--noprogress",
|
||||||
*App.smtbmc_options,
|
*App.smtbmc_options,
|
||||||
str(smt2_model),
|
str(smt2_model),
|
||||||
],
|
],
|
||||||
|
@ -481,7 +482,11 @@ class Smtbmc(tl.process.Process):
|
||||||
|
|
||||||
async def on_run(self) -> None:
|
async def on_run(self) -> None:
|
||||||
def output_handler(event: tl.process.StdoutEvent):
|
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}")
|
tl.log_debug(f"smtbmc > {result!r}")
|
||||||
if "err" in result:
|
if "err" in result:
|
||||||
exception = tl.logging.LoggedError(
|
exception = tl.logging.LoggedError(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue