runtests.sh: add --python-versions option
authorZac Medico <zmedico@gentoo.org>
Tue, 25 Oct 2011 06:42:51 +0000 (23:42 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 Oct 2011 06:42:51 +0000 (23:42 -0700)
runtests.sh

index d55860af05d014095d7ad68bfcdf28e520589b9a..31bbaf834ee0402f3a9b1b0def602fa9cdd16a6f 100755 (executable)
@@ -27,6 +27,19 @@ interrupted() {
 
 trap interrupted SIGINT
 
+while [[ -n $1 ]] ; do
+       case "$1" in
+               --python-versions=*)
+                       PYTHON_VERSIONS=${1#--python-versions=}
+                       ;;
+               --python-versions)
+                       shift
+                       PYTHON_VERSIONS=$1
+                       ;;
+       esac
+       shift
+done
+
 exit_status="0"
 for version in ${PYTHON_VERSIONS}; do
        if [[ -x /usr/bin/python${version} ]]; then