From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v2 1/1] utils/show-progress: add tool to show build progress at runtime
Date: Sun, 4 Aug 2019 17:51:58 +0200 [thread overview]
Message-ID: <20190804155158.GA30044@scaer> (raw)
In-Reply-To: <20190718073243.10767-1-vadim4j@gmail.com>
Vadim, All,
On 2019-07-18 10:32 +0300, Vadim Kochan spake thusly:
> This might be useful to watch the amount of built and selected
> packages and some progress about it. So added python script which
> prints progress and build stats. The sample of output is:
>
> Press Ctrl-C to exit ...
>
> Building: output/qemu_x86_64
> ##################################------------------------------ [ 42.42% 14/33]
With this defconfig:
BR2_arm=y
BR2_cortex_a7=y
BR2_TOOLCHAIN_EXTERNAL=y
# BR2_TARGET_ROOTFS_TAR is not set
and building out-of-tree, the script never reaches 100%:
$ ../buildroot/utils/show-progress
Press Ctrl-C to exit ...
Building: .
#########################################################################------- [ 91.67% 11/12]
Even though the build did finish...
> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
[--SNIP--]
> diff --git a/utils/show-progress b/utils/show-progress
> new file mode 100755
> index 0000000000..ee1e1da289
> --- /dev/null
> +++ b/utils/show-progress
> @@ -0,0 +1,91 @@
> +#!/usr/bin/env python
This is actually a python3 script, and is not a valid pyhon2 one.
> +# Copyright (C) 2019 Vadim Kochan <vadim4j@gmail.com>
There is no reason nowadays to add copyright notices. The copyright is
defacto by the Bern convention. Furthermore, in an opensource project,
this notice is wrong as ssoon as other contributors do substantial
modification to the file.
And the git log is a much better way to extract authroship of a file.
[--SNIP--]
> +def progress(ready, total):
> + perc = ready / total
> + fill = round(perc * 80)
> + print('\r', '#' * fill + '-' * (80 - fill), '[{:>7.2%} {}/{} ]'.format(perc, ready, total), end='')
I've locally changed it to:
print('\r', '#' * fill + '-' * (80 - fill), '[{:>7.2%} {: >2d}/{}]'.format(perc, ready, total), end='')
> + print("Press Ctrl-C to exit ...\n")
> + print("Building: " + build_dir)
This print '.' as the build directory when doing an out-of-tree build
(see above). I've locally changed it to:
print("Building: " + os.path.realpath(build_dir))
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-08-04 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-18 7:32 [Buildroot] [RFC v2 1/1] utils/show-progress: add tool to show build progress at runtime Vadim Kochan
2019-08-04 15:51 ` Yann E. MORIN [this message]
2019-08-06 8:54 ` Vadim Kochan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190804155158.GA30044@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox