From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/4] supprt/test-pkg: add option to limit the number of tests
Date: Tue, 7 Feb 2017 15:29:53 +0100 [thread overview]
Message-ID: <20170207142953.GD3578@free.fr> (raw)
In-Reply-To: <3a2dfc3a5dcf4389d2b65b91de95124385241a18.1486475561.git.yann.morin.1998@free.fr>
All,
On 2017-02-07 14:53 +0100, Yann E. MORIN spake thusly:
> Sometimes, it interesting to have a global overview of whether the
> package builds at all or not, rather than test on all toolchains.
>
> Add an option that allows testing on a limited set of randomly choosen
> toolchains.
Forget that patch, there is an issue when the option is not provided. :-(
Regards,
Yann E. MORIN.
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> ---
> support/scripts/test-pkg | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/support/scripts/test-pkg b/support/scripts/test-pkg
> index 604a759..0b4615d 100755
> --- a/support/scripts/test-pkg
> +++ b/support/scripts/test-pkg
> @@ -5,15 +5,16 @@ TOOLCHAINS_BASE_URL='http://autobuild.buildroot.org/toolchains/configs'
>
> main() {
> local o O opts
> - local cfg dir pkg toolchain
> + local cfg dir pkg random toolchain
> local ret nb_dl nb_cfg nb_skip nb_clean nb_build
> local -a toolchains
>
> - o='hc:d:p:'
> - O='help,config-snippet:build-dir:package:'
> + o='hc:d:p:r:'
> + O='help,config-snippet:build-dir:package:,random::'
> opts="$( getopt -n "${my_name}" -o "${o}" -l "${O}" -- "${@}" )"
> eval set -- "${opts}"
>
> + random=0
> while [ ${#} -gt 0 ]; do
> case "${1}" in
> (-h|--help)
> @@ -28,6 +29,9 @@ main() {
> (-p|--package)
> pkg="${2}"; shift 2
> ;;
> + (-r|--random)
> + random="${2}"; shift 2
> + ;;
> (--)
> shift; break
> ;;
> @@ -43,7 +47,10 @@ main() {
> # Extract the names of the toolchains
> # http://server/path/to/name.config,arch,libc --> name
> toolchains=( $( curl -s "${TOOLCHAINS_BASE_URL}/toolchain-configs.csv" \
> - |sed -r -e 's/,.*//; s:.*/(.*)\.config:\1:; /internal/d;'
> + |sed -r -e 's/,.*//; s:.*/(.*)\.config:\1:; /internal/d;' \
> + |if [ ${random} -gt 0 ]; then \
> + sort -R |head -n ${random} |sort
> + fi
> )
> )
>
> @@ -187,6 +194,10 @@ Options
> Test-build the package PKG, by running 'make PKG'; if not specified,
> just runs 'make'.
>
> + -r N, --random N
> + Limit the tests to the N randomly selected toolchains, instead of
> + building all.
> +
> Example:
>
> Testing libcec would require a config snippet that contains:
> --
> 2.7.4
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2017-02-07 14:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 13:52 [Buildroot] [PATCH 0/4] support: script to build-test packages Yann E. MORIN
2017-02-07 13:52 ` [Buildroot] [PATCH 1/4] support/scripts: add script to test a package Yann E. MORIN
2017-02-07 15:18 ` Luca Ceresoli
2017-02-07 21:39 ` Thomas De Schampheleire
2017-02-07 13:52 ` [Buildroot] [PATCH 2/4] support/test-pkg: store lines missing from resulting configuraiton Yann E. MORIN
2017-02-07 15:29 ` Luca Ceresoli
2017-02-07 13:52 ` [Buildroot] [PATCH 3/4] support/test-pkg: report number and types of failures Yann E. MORIN
2017-02-07 15:42 ` Luca Ceresoli
2017-02-07 13:53 ` [Buildroot] [PATCH 4/4] supprt/test-pkg: add option to limit the number of tests Yann E. MORIN
2017-02-07 14:29 ` Yann E. MORIN [this message]
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=20170207142953.GD3578@free.fr \
--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