aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2010-08-15 11:43:15 +0200
committerFabian Groffen <grobian@gentoo.org>2010-08-15 11:43:15 +0200
commitf17de73d0cbedad35501669d12bd6cf50bcc9d06 (patch)
treef0adad22b1327f71df2954947148bad20a26008a /runtests.sh
parentMerge remote branch 'overlays-gentoo-org/master' into prefix (diff)
parentAdd some ebuild metadata for realism. (diff)
downloadportage-f17de73d0cbedad35501669d12bd6cf50bcc9d06.tar.gz
portage-f17de73d0cbedad35501669d12bd6cf50bcc9d06.tar.bz2
portage-f17de73d0cbedad35501669d12bd6cf50bcc9d06.zip
Merge remote branch 'overlays-gentoo-org/master' into prefix
Conflicts: bin/ebuild-helpers/die bin/ebuild-helpers/dobin bin/ebuild-helpers/dodir bin/ebuild-helpers/dodoc bin/ebuild-helpers/dohtml bin/ebuild-helpers/doinfo bin/ebuild-helpers/dosbin bin/ebuild-helpers/dosym bin/ebuild-helpers/ecompressdir bin/ebuild-helpers/emake bin/ebuild-helpers/fowners bin/ebuild-helpers/fperms bin/ebuild-helpers/portageq bin/ebuild.sh bin/misc-functions.sh bin/repoman pym/_emerge/Package.py pym/_emerge/depgraph.py pym/portage/_deprecated.py pym/portage/dbapi/bintree.py pym/portage/package/ebuild/config.py
Diffstat (limited to 'runtests.sh')
-rwxr-xr-xruntests.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/runtests.sh b/runtests.sh
new file mode 100755
index 000000000..b6d437564
--- /dev/null
+++ b/runtests.sh
@@ -0,0 +1,30 @@
+#!@PORTAGE_BASH@
+
+PYTHON_VERSIONS="2.6 2.7 3.1 3.2"
+
+case "${NOCOLOR:-false}" in
+ yes|true)
+ GOOD=
+ BAD=
+ NORMAL=
+ ;;
+ no|false)
+ GOOD=$'\e[1;32m'
+ BAD=$'\e[1;31m'
+ NORMAL=$'\e[0m'
+ ;;
+esac
+
+exit_status="0"
+for version in ${PYTHON_VERSIONS}; do
+ if [[ -x @PORTAGE_PYTHON@${version} ]]; then
+ echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
+ if ! PYTHONPATH="pym${PYTHONPATH:+:}${PYTHONPATH}" @PORTAGE_PYTHON@${version} pym/portage/tests/runTests; then
+ echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
+ exit_status="1"
+ fi
+ echo
+ fi
+done
+
+exit ${exit_status}