diff options
author | Fabian Groffen <grobian@gentoo.org> | 2013-01-05 19:12:01 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2013-01-05 19:12:01 +0100 |
commit | cefe9ddc5e1b8a1ba727afddd11638723875949c (patch) | |
tree | 1ccdb0bde716a04705d095f0c0802e5888055af5 /runtests.sh | |
parent | files: import errno before using it (diff) | |
parent | Handle os.write() return code with loop. (diff) | |
download | portage-cefe9ddc5e1b8a1ba727afddd11638723875949c.tar.gz portage-cefe9ddc5e1b8a1ba727afddd11638723875949c.tar.bz2 portage-cefe9ddc5e1b8a1ba727afddd11638723875949c.zip |
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
Conflicts:
bin/archive-conf
bin/binhost-snapshot
bin/clean_locks
bin/dispatch-conf
bin/ebuild
bin/ebuild-ipc.py
bin/egencache
bin/emaint
bin/emerge
bin/env-update
bin/fixpackages
bin/glsa-check
bin/lock-helper.py
bin/phase-functions.sh
bin/portageq
bin/quickpkg
bin/regenworld
bin/repoman
bin/xpak-helper.py
Diffstat (limited to 'runtests.sh')
-rwxr-xr-x | runtests.sh | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/runtests.sh b/runtests.sh index dac6a3b29..493bb7533 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,28 @@ 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 )) + (( columns >= 7 )) || columns=7 + 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} |