mirror of
https://github.com/YosysHQ/sby.git
synced 2025-07-31 10:23:19 +00:00
Add color handling via click.style and click.echo
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
This commit is contained in:
parent
54cb030738
commit
003ccf7197
5 changed files with 40 additions and 28 deletions
|
@ -16,7 +16,7 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
import re, os, getopt
|
||||
import re, os, getopt, click
|
||||
from sby_core import SbyProc
|
||||
|
||||
def run(mode, task, engine_idx, engine):
|
||||
|
@ -98,7 +98,7 @@ def run(mode, task, engine_idx, engine):
|
|||
aiw_file.close()
|
||||
|
||||
task.update_status(proc_status)
|
||||
task.log(f"engine_{engine_idx}: Status returned by engine: {proc_status}")
|
||||
task.log(f"{click.style(f'engine_{engine_idx}', fg='magenta')}: Status returned by engine: {proc_status}")
|
||||
task.summary.append(f"""engine_{engine_idx} ({" ".join(engine)}) returned {proc_status}""")
|
||||
|
||||
task.terminate()
|
||||
|
@ -159,7 +159,7 @@ def run(mode, task, engine_idx, engine):
|
|||
proc2.exit_callback = exit_callback2
|
||||
|
||||
else:
|
||||
task.log(f"engine_{engine_idx}: Engine did not produce a counter example.")
|
||||
task.log(f"{click.style(f'engine_{engine_idx}', fg='magenta')}: Engine did not produce a counter example.")
|
||||
|
||||
proc.output_callback = output_callback
|
||||
proc.exit_callback = exit_callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue