From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D446913821B for ; Tue, 1 Jan 2013 12:26:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCADD21C046; Tue, 1 Jan 2013 12:26:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6321B21C046 for ; Tue, 1 Jan 2013 12:26:05 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C210D33D751 for ; Tue, 1 Jan 2013 12:26:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 5CC90E5439 for ; Tue, 1 Jan 2013 12:26:02 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1357043054.e1765ca490428c2fc4c1bf2d414c2174c402b85c.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: / X-VCS-Repository: proj/portage X-VCS-Files: runtests.sh X-VCS-Directories: / X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: e1765ca490428c2fc4c1bf2d414c2174c402b85c X-VCS-Branch: master Date: Tue, 1 Jan 2013 12:26:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 356142d0-8203-4b39-9878-7fc2177dbef7 X-Archives-Hash: bc572a36726e402bf017072714abf3e8 commit: e1765ca490428c2fc4c1bf2d414c2174c402b85c Author: Zac Medico gentoo org> AuthorDate: Tue Jan 1 12:24:14 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jan 1 12:24:14 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e1765ca4 runtests.sh: summarize results for all versions --- runtests.sh | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/runtests.sh b/runtests.sh index 25389b8..6dc0c40 100755 --- a/runtests.sh +++ b/runtests.sh @@ -49,6 +49,8 @@ set -- "${unused_args[@]}" eprefix=${PORTAGE_OVERRIDE_EPREFIX} exit_status="0" +found_versions=() +status_array=() for version in ${PYTHON_VERSIONS}; do if [[ $version =~ ^([[:digit:]]+\.[[:digit:]]+)-pypy-([[:digit:]]+\.[[:digit:]]+)$ ]] ; then executable=${eprefix}/usr/bin/pypy-c${BASH_REMATCH[2]} @@ -57,7 +59,11 @@ for version in ${PYTHON_VERSIONS}; do fi if [[ -x "${executable}" ]]; then echo -e "${GOOD}Testing with Python ${version}...${NORMAL}" - if ! "${executable}" -Wd pym/portage/tests/runTests "$@" ; then + "${executable}" -Wd pym/portage/tests/runTests "$@" + status=$? + status_array[${#status_array[@]}]=${status} + found_versions[${#found_versions[@]}]=${version} + if [ ${status} -ne 0 ] ; then echo -e "${BAD}Testing with Python ${version} failed${NORMAL}" exit_status="1" fi @@ -65,4 +71,27 @@ for version in ${PYTHON_VERSIONS}; do fi done +if [ ${#status_array[@]} -gt 0 ] ; then + max_len=0 + for version in ${found_versions[@]} ; do + [ ${#version} -gt ${max_len} ] && max_len=${#version} + done + (( columns = max_len + 2 )) + printf "\nSummary:\n\n" + printf "| %-${columns}s | %s\n|" "Version" "Status" + (( total_cols = columns + 11 )) + eval "printf -- '-%.0s' {1..${total_cols}}" + printf "\n" + row=0 + for version in ${found_versions[@]} ; do + if [ ${status_array[${row}]} -eq 0 ] ; then + status="success" + else + status="fail" + fi + printf "| %-${columns}s | %s\n" "${version}" "${status}" + (( row++ )) + done +fi + exit ${exit_status}