From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Matthew Weber <matthew.weber@collins.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/3] utils/test-pkg: add ability to fail when skipped
Date: Sat, 1 Jan 2022 22:08:57 +0100 [thread overview]
Message-ID: <20220101210857.GA69135@scaer> (raw)
In-Reply-To: <20211201230827.35080-2-matthew.weber@collins.com>
Matthew, All,
On 2021-12-01 17:08 -0600, Matthew Weber via buildroot spake thusly:
> Add flag to allow the return value to be incremented when a skip
> happens, treating the overall run as a failure.
>
> This flag could be used when using test-pkg for local validation of
> downstream packages, for example in a user's br2-external. An example of
> this could be a user choosing to use test-pkg as part of a CI
> infrastructure where the fragment and toolchains are tightly controlled
> to test a package against multiple toolchains easily.
>
> In this case, the user would want to lower the rate of false-positives
> of that fragment/toolchain configuration if a build is instead skipped
> (which may happen in the case of buildroot version bumps where
> dependencies could change).
I am a bit skeptical about this use-case.
As I understand it, wht is most interesting in a CI setup for internal
development, is that *all* internal packages do build togetrher and form
a working sysem *as a whole*.
As such, a CI setup would build the defconfig file(s) for a project (and
run the integration test-suite), rather than build each package
individually
Building each package individually with test-pkg would have the
disadvantage that it takes more time overall, as all the common deps are
build as many times as there are packages to test, and package are also
dependencies one of the others, so most packages would be built more
than once as well...
So, I am really not convinced...
Regards,
Yann E. MORIN.
> Signed-off-by: Matthew Weber <matthew.weber@collins.com>
> ---
> utils/test-pkg | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/utils/test-pkg b/utils/test-pkg
> index d0472f176b..97957008fa 100755
> --- a/utils/test-pkg
> +++ b/utils/test-pkg
> @@ -18,8 +18,8 @@ main() {
> local -a toolchains
> local pkg_br_name
>
> - o='hakc:d:n:p:r:t:e:'
> - O='help,all,keep,prepare-only,config-snippet:,build-dir:,number:,package:,random:,toolchains-csv:,externals:,'
> + o='hakc:d:n:p:r:t:e:f'
> + O='help,all,keep,prepare-only,config-snippet:,build-dir:,number:,package:,random:,toolchains-csv:,externals:,fail-on-skip'
> opts="$(getopt -n "${my_name}" -o "${o}" -l "${O}" -- "${@}")"
> eval set -- "${opts}"
>
> @@ -29,6 +29,7 @@ main() {
> number=0
> mode=0
> prepare_only=0
> + fail_on_skip=0
> toolchains_csv="${TOOLCHAINS_CSV}"
> while [ ${#} -gt 0 ]; do
> case "${1}" in
> @@ -65,6 +66,9 @@ main() {
> (-e|--externals)
> BR2_EXTERNALS="${2}"; shift 2
> ;;
> + (-f|--fail-on-skip)
> + fail_on_skip=1; shift 1
> + ;;
> (--)
> shift; break
> ;;
> @@ -147,7 +151,12 @@ main() {
> printf "%d builds, %d skipped, %d build failed, %d legal-info failed\n" \
> ${nb} ${nb_skip} ${nb_fail} ${nb_legal}
>
> - return $((nb_fail + nb_legal))
> + nb_result=$((nb_fail + nb_legal))
> + if [ ${fail_on_skip} ]; then
> + nb_result=$((nb_result + nb_skip))
> + fi
> +
> + return $nb_result
> }
>
> build_one() {
> @@ -279,6 +288,9 @@ Options:
> Externals to be used as part of the build process. Packages from
> within these externals may be tested.
>
> + -f, --fail-on-skip
> + If any builds are skipped, return a negative exit value.
> +
> Example:
>
> Testing libcec would require a config snippet that contains:
> --
> 2.17.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-01-01 21:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 23:08 [Buildroot] [PATCH 1/3] utils/test-pkg: add support for externals Matthew Weber via buildroot
2021-12-01 23:08 ` [Buildroot] [PATCH 2/3] utils/test-pkg: add ability to fail when skipped Matthew Weber via buildroot
2022-01-01 21:08 ` Yann E. MORIN [this message]
2022-01-31 20:54 ` Arnout Vandecappelle
2021-12-01 23:08 ` [Buildroot] [PATCH 3/3] docs/manual: add section describing testing external applications Matthew Weber via buildroot
2022-01-03 20:59 ` [Buildroot] [PATCH 1/3] utils/test-pkg: add support for externals Yann E. MORIN
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=20220101210857.GA69135@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=matthew.weber@collins.com \
/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