[PATCH] tbot/main.py: print tbot flags on start

Heiko Schocher hs at denx.de
Wed Apr 15 13:39:33 CEST 2020


print passed tbot flags on startup (and so, they are
also in the logfile for later reference).

Example output:

tbot starting ...
├─Parameters:
│     cycles     = 100
├─Flags:
│ 'v4', 'splusbloader', 'threadripper-build'

Signed-off-by: Heiko Schocher <hs at denx.de>
---

 tbot/main.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tbot/main.py b/tbot/main.py
index a900a48..5893ab5 100644
--- a/tbot/main.py
+++ b/tbot/main.py
@@ -292,6 +292,16 @@ def main() -> None:  # noqa: C901
         )
     # }}}
 
+    if len(tbot.flags) != 0:
+        highlight = _import_hightlighter()
+        tbot.log.message(
+            tbot.log.c("Flags:\n").bold
+            + ", ".join(
+                highlight(f"{flag!r}")
+                for flag in tbot.flags
+            )
+        )
+
     try:
         for tc in args.testcase:
             func = testcases[tc]
-- 
2.24.1



More information about the tbot mailing list