[PATCH] tbot/main.py: print tbot flags on start
Harald Seiler
hws at denx.de
Wed Apr 15 14:04:46 CEST 2020
Hello Heiko,
On Wed, 2020-04-15 at 13:39 +0200, Heiko Schocher wrote:
> 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'
This makes a lot of sense; applied to tbot/master, thanks!
> 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]
--
Harald
More information about the tbot
mailing list