Fix backtrack max_retries calculation.
[portage.git] / runtests.sh
1 #!/bin/bash
2
3 PYTHON_VERSIONS="2.6 2.7 3.1 3.2"
4
5 case "${NOCOLOR:-false}" in
6         yes|true)
7                 GOOD=
8                 BAD=
9                 NORMAL=
10                 ;;
11         no|false)
12                 GOOD=$'\e[1;32m'
13                 BAD=$'\e[1;31m'
14                 NORMAL=$'\e[0m'
15                 ;;
16 esac
17
18 exit_status="0"
19 for version in ${PYTHON_VERSIONS}; do
20         if [[ -x /usr/bin/python${version} ]]; then
21                 echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
22                 if ! /usr/bin/python${version} pym/portage/tests/runTests; then
23                         echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
24                         exit_status="1"
25                 fi
26                 echo
27         fi
28 done
29
30 exit ${exit_status}