diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-02-13 16:41:38 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-02-13 16:41:38 -0800 |
commit | d806b859e0a7181c30bd13a7714cd47e5a582314 (patch) | |
tree | a3f70e5a7741c189715e7e0359e6103621202527 | |
parent | 6d2a73d7f78dac986539c0c6b841cc499c2088e6 (diff) | |
download | portage-d806b859e0a7181c30bd13a7714cd47e5a582314.tar.gz portage-d806b859e0a7181c30bd13a7714cd47e5a582314.tar.bz2 portage-d806b859e0a7181c30bd13a7714cd47e5a582314.zip |
runtests.sh: test PyPy 1.8, and support prefix
-rwxr-xr-x | runtests.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/runtests.sh b/runtests.sh index 30ddeeffa..56aa2cc1e 100755 --- a/runtests.sh +++ b/runtests.sh @@ -1,8 +1,8 @@ #!/bin/bash -# Copyright 2010-2011 Gentoo Foundation +# Copyright 2010-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -PYTHON_VERSIONS="2.6 2.7 3.1 3.2 3.3" +PYTHON_VERSIONS="2.6 2.7 2.7-pypy-1.8 3.1 3.2 3.3" # has to be run from portage root dir cd "${0%/*}" || exit 1 @@ -47,11 +47,17 @@ done set -- "${unused_args[@]}" +eprefix=${PORTAGE_OVERRIDE_EPREFIX} exit_status="0" for version in ${PYTHON_VERSIONS}; do - if [[ -x /usr/bin/python${version} ]]; then + if [[ $version =~ ^([[:digit:]]+\.[[:digit:]]+)-pypy-([[:digit:]]+\.[[:digit:]]+)$ ]] ; then + executable=${eprefix}/usr/bin/pypy-c${BASH_REMATCH[2]} + else + executable=${eprefix}/usr/bin/python${version} + fi + if [[ -x "${executable}" ]]; then echo -e "${GOOD}Testing with Python ${version}...${NORMAL}" - if ! /usr/bin/python${version} -Wd pym/portage/tests/runTests "$@" ; then + if ! "${executable}" -Wd pym/portage/tests/runTests "$@" ; then echo -e "${BAD}Testing with Python ${version} failed${NORMAL}" exit_status="1" fi |