1 |
On Sun, 2014-01-05 at 10:50 -0500, Mike Frysinger wrote: |
2 |
> This way people don't have to worry about runtests.sh passing for a |
3 |
> specific version when it wasn't found in the system. |
4 |
> --- |
5 |
> runtests.sh | 6 ++++++ |
6 |
> 1 file changed, 6 insertions(+) |
7 |
> |
8 |
> diff --git a/runtests.sh b/runtests.sh |
9 |
> index 3006be5..2870907 100755 |
10 |
> --- a/runtests.sh |
11 |
> +++ b/runtests.sh |
12 |
> @@ -30,15 +30,18 @@ interrupted() { |
13 |
> trap interrupted SIGINT |
14 |
> |
15 |
> unused_args=() |
16 |
> +IGNORE_MISSING_VERSIONS=true |
17 |
> |
18 |
> while [ $# -gt 0 ] ; do |
19 |
> case "$1" in |
20 |
> --python-versions=*) |
21 |
> PYTHON_VERSIONS=${1#--python-versions=} |
22 |
> + IGNORE_MISSING_VERSIONS=false |
23 |
> ;; |
24 |
> --python-versions) |
25 |
> shift |
26 |
> PYTHON_VERSIONS=$1 |
27 |
> + IGNORE_MISSING_VERSIONS=false |
28 |
> ;; |
29 |
> *) |
30 |
> unused_args[${#unused_args[@]}]=$1 |
31 |
> @@ -73,6 +76,9 @@ for version in ${PYTHON_VERSIONS}; do |
32 |
> exit_status="1" |
33 |
> fi |
34 |
> echo |
35 |
> + elif [[ ${IGNORE_MISSING_VERSIONS} != "true" ]] ; then |
36 |
> + echo -e "${BAD}Could not find requested Python ${version}${NORMAL}" |
37 |
> + exit_status="1" |
38 |
> fi |
39 |
> done |
40 |
> |
41 |
looks good to me, do it :) |