From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 02/13] support/test-pkg: print number of toolchains and progress
Date: Thu, 6 Apr 2017 20:18:42 +0200 [thread overview]
Message-ID: <20170406181854.5242-2-arnout@mind.be> (raw)
In-Reply-To: <cover.1491502445.git.arnout@mind.be>
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Changes v4 -> v5 by Arnout:
- toolchain -> toolchains in commit message
- rebase
---
docs/manual/adding-packages-tips.txt | 22 +++++++++++-----------
support/scripts/test-pkg | 24 +++++++++---------------
2 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/docs/manual/adding-packages-tips.txt b/docs/manual/adding-packages-tips.txt
index 09cf9d437f..e1f6986724 100644
--- a/docs/manual/adding-packages-tips.txt
+++ b/docs/manual/adding-packages-tips.txt
@@ -84,17 +84,17 @@ result (excerpt, results are fake):
----
$ ./support/scripts/test-pkg -c libcurl.config -p libcurl
- armv5-ctng-linux-gnueabi: OK
- armv7-ctng-linux-gnueabihf: OK
- br-aarch64-glibc: SKIPPED
- br-arcle-hs38: SKIPPED
- br-arm-basic: FAILED
- br-arm-cortex-a9-glibc: OK
- br-arm-cortex-a9-musl: FAILED
- br-arm-cortex-m4-full: OK
- br-arm-full: OK
- br-arm-full-nothread: OK
- br-arm-full-static: OK
+ armv5-ctng-linux-gnueabi [ 1/11]: OK
+ armv7-ctng-linux-gnueabihf [ 2/11]: OK
+ br-aarch64-glibc [ 3/11]: SKIPPED
+ br-arcle-hs38 [ 4/11]: SKIPPED
+ br-arm-basic [ 5/11]: FAILED
+ br-arm-cortex-a9-glibc [ 6/11]: OK
+ br-arm-cortex-a9-musl [ 7/11]: FAILED
+ br-arm-cortex-m4-full [ 8/11]: OK
+ br-arm-full [ 9/11]: OK
+ br-arm-full-nothread [10/11]: OK
+ br-arm-full-static [11/11]: OK
11 builds, 2 skipped, 2 failed
----
diff --git a/support/scripts/test-pkg b/support/scripts/test-pkg
index 0e7779de49..f9f994402d 100755
--- a/support/scripts/test-pkg
+++ b/support/scripts/test-pkg
@@ -6,7 +6,7 @@ TOOLCHAINS_URL='http://autobuild.buildroot.org/toolchains/configs/toolchain-conf
main() {
local o O opts
local cfg dir pkg random toolchain
- local ret nb nb_skip nb_fail
+ local ret nb nb_skip nb_fail nb_tc
local -a toolchains
o='hc:d:p:r:'
@@ -60,7 +60,8 @@ main() {
)
)
- if [ ${#toolchains[@]} -eq 0 ]; then
+ nb_tc="${#toolchains[@]}"
+ if [ ${nb_tc} -eq 0 ]; then
printf "error: no toolchain found (networking issue?)\n" >&2; exit 1
fi
@@ -68,13 +69,15 @@ main() {
nb_skip=0
nb_fail=0
for toolchain in "${toolchains[@]}"; do
+ : $((nb++))
+ printf "%40s [%*d/%d]: " "$(basename "${toolchain}" .config)" \
+ ${#nb_tc} ${nb} ${nb_tc}
build_one "${dir}" "${toolchain}" "${cfg}" "${pkg}" && ret=0 || ret=${?}
case ${ret} in
- (0) ;;
- (1) : $((nb_skip++));;
- (2) : $((nb_fail++));;
+ (0) printf "OK\n";;
+ (1) : $((nb_skip++)); printf "SKIPPED\n";;
+ (2) : $((nb_fail++)); printf "FAILED\n";;
esac
- : $((nb++))
done
printf "%d builds, %d skipped, %d failed\n" ${nb} ${nb_skip} ${nb_fail}
@@ -90,13 +93,10 @@ build_one() {
# Using basename(1) on a URL works nicely
toolchain="$(basename "${url}" .config)"
- printf "%40s: " "${toolchain}"
-
dir="${dir}/${toolchain}"
mkdir -p "${dir}"
if ! curl -s "${url}" >"${dir}/.config"; then
- printf "FAILED\n"
return 2
fi
@@ -109,7 +109,6 @@ build_one() {
cat "${cfg}" >>"${dir}/.config"
if ! make O="${dir}" olddefconfig > "${dir}/logfile" 2>&1; then
- printf "FAILED\n"
return 2
fi
# We want all the options from the snippet to be present as-is (set
@@ -120,7 +119,6 @@ build_one() {
# done in the same locale.
comm -23 <(sort "${cfg}") <(sort "${dir}/.config") >"${dir}/missing.config"
if [ -s "${dir}/missing.config" ]; then
- printf "SKIPPED\n"
return 1
fi
# Remove file, it's empty anyway.
@@ -128,18 +126,14 @@ build_one() {
if [ -n "${pkg}" ]; then
if ! make O="${dir}" "${pkg}-dirclean" >> "${dir}/logfile" 2>&1; then
- printf "FAILED\n"
return 2
fi
fi
# shellcheck disable=SC2086
if ! make O="${dir}" ${pkg} >> "${dir}/logfile" 2>&1; then
- printf "FAILED\n"
return 2
fi
-
- printf "OK\n"
}
help() {
--
2.11.0
next prev parent reply other threads:[~2017-04-06 18:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 18:18 [Buildroot] [PATCH v5 00/13] support/test-pkg: fixes and enhancements + add autobuild defconfigs Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 01/13] docs/manual: document the test-pkg script Arnout Vandecappelle
2017-04-06 19:51 ` Thomas Petazzoni
2017-04-06 18:18 ` Arnout Vandecappelle [this message]
2017-04-06 19:51 ` [Buildroot] [PATCH v5 02/13] support/test-pkg: print number of toolchains and progress Thomas Petazzoni
2017-04-06 18:18 ` [Buildroot] [PATCH v5 03/13] support/test-pkg: calculate toolchain name only once Arnout Vandecappelle
2017-04-06 20:51 ` Yann E. MORIN
2017-04-07 10:35 ` Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 04/13] support/test-pkg: run legal-info Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 05/13] Makefile: support defconfigs in subdirectories Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 06/13] configs: add autobuild toolchain defconfigs Arnout Vandecappelle
2017-04-06 19:55 ` Thomas Petazzoni
2017-04-06 20:39 ` Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 07/13] support/test-pkg: move minimal.config into a separate file Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 08/13] support/test-pkg: get configs from buildroot defconfigs Arnout Vandecappelle
2017-04-06 19:37 ` Thomas Petazzoni
2017-04-06 20:48 ` Yann E. MORIN
2017-04-06 20:50 ` Thomas Petazzoni
2017-04-07 10:35 ` Arnout Vandecappelle
2017-04-07 10:44 ` Thomas Petazzoni
2017-04-06 18:18 ` [Buildroot] [PATCH v5 09/13] support/test-pkg: add option to use an alternate toolchain directory Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 10/13] Makefile: refactor *config targets Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 11/13] Makefile: add alldefconfig target Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 12/13] support/test-pkg: use merge_config.sh to merge the fragments Arnout Vandecappelle
2017-04-06 18:18 ` [Buildroot] [PATCH v5 13/13] [RFC] list-defconfigs: support defconfigs in subdirectories Arnout Vandecappelle
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=20170406181854.5242-2-arnout@mind.be \
--to=arnout@mind.be \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.