mirror of
https://github.com/YosysHQ/sby.git
synced 2025-07-18 04:26:44 +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 types import SimpleNamespace
|
||||
from sby_core import SbyProc
|
||||
|
||||
|
@ -87,11 +87,11 @@ def run(mode, task, engine_idx, engine):
|
|||
task.error(f"engine_{engine_idx}: Engine terminated without status.")
|
||||
|
||||
task.update_status(proc_status.upper())
|
||||
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}""")
|
||||
|
||||
if len(common_state.produced_traces) == 0:
|
||||
task.log(f"""engine_{engine_idx}: Engine did not produce a{" counter" if mode != "cover" else "n "}example.""")
|
||||
task.log(f"""{click.style(f'engine_{engine_idx}', fg='magenta')}: Engine did not produce a{" counter" if mode != "cover" else "n "}example.""")
|
||||
elif len(common_state.produced_traces) <= common_state.print_traces_max:
|
||||
task.summary.extend(common_state.produced_traces)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue