From patchwork Thu Apr 6 18:18:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 747926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vzWFj1T0gz9s7j for ; Fri, 7 Apr 2017 04:19:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 50EB28699B; Thu, 6 Apr 2017 18:19:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OIEWIF-rTVa6; Thu, 6 Apr 2017 18:19:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D37A086812; Thu, 6 Apr 2017 18:19:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2016A1C276A for ; Thu, 6 Apr 2017 18:19:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1748488B46 for ; Thu, 6 Apr 2017 18:19:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yr0Z9MQS3Qai for ; Thu, 6 Apr 2017 18:19:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6B07C88B4F for ; Thu, 6 Apr 2017 18:19:15 +0000 (UTC) Received: from vandecaa-laptop.septentrio.local (10.3.4.134) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Thu, 6 Apr 2017 20:18:55 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Thu, 6 Apr 2017 20:18:42 +0200 Message-ID: <20170406181854.5242-2-arnout@mind.be> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.3.4.134] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH v5 02/13] support/test-pkg: print number of toolchains and progress X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: "Yann E. MORIN" Signed-off-by: "Yann E. MORIN" Cc: Thomas De Schampheleire Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- 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() {