test_merge_order: test circular RDEPEND + PDEPEND
[portage.git] / runtests.sh
1 #!/bin/bash
2 # Copyright 2010-2011 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 PYTHON_VERSIONS="2.6 2.7 3.1 3.2 3.3"
6
7 case "${NOCOLOR:-false}" in
8         yes|true)
9                 GOOD=
10                 BAD=
11                 NORMAL=
12                 ;;
13         no|false)
14                 GOOD=$'\e[1;32m'
15                 BAD=$'\e[1;31m'
16                 NORMAL=$'\e[0m'
17                 ;;
18 esac
19
20 interrupted() {
21         echo "interrupted." >&2
22         exit 1
23 }
24
25 trap interrupted SIGINT
26
27 exit_status="0"
28 for version in ${PYTHON_VERSIONS}; do
29         if [[ -x /usr/bin/python${version} ]]; then
30                 echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
31                 if ! /usr/bin/python${version} pym/portage/tests/runTests "$@" ; then
32                         echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
33                         exit_status="1"
34                 fi
35                 echo
36         fi
37 done
38
39 exit ${exit_status}