Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH 2/3] runtests: hardfail when a requested version is not found
Date: Sun, 05 Jan 2014 15:50:41
Message-Id: 1388937034-22930-2-git-send-email-vapier@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 1/3] runtests: add a "supported" shortcut by Mike Frysinger
1 This way people don't have to worry about runtests.sh passing for a
2 specific version when it wasn't found in the system.
3 ---
4 runtests.sh | 6 ++++++
5 1 file changed, 6 insertions(+)
6
7 diff --git a/runtests.sh b/runtests.sh
8 index 3006be5..2870907 100755
9 --- a/runtests.sh
10 +++ b/runtests.sh
11 @@ -30,15 +30,18 @@ interrupted() {
12 trap interrupted SIGINT
13
14 unused_args=()
15 +IGNORE_MISSING_VERSIONS=true
16
17 while [ $# -gt 0 ] ; do
18 case "$1" in
19 --python-versions=*)
20 PYTHON_VERSIONS=${1#--python-versions=}
21 + IGNORE_MISSING_VERSIONS=false
22 ;;
23 --python-versions)
24 shift
25 PYTHON_VERSIONS=$1
26 + IGNORE_MISSING_VERSIONS=false
27 ;;
28 *)
29 unused_args[${#unused_args[@]}]=$1
30 @@ -73,6 +76,9 @@ for version in ${PYTHON_VERSIONS}; do
31 exit_status="1"
32 fi
33 echo
34 + elif [[ ${IGNORE_MISSING_VERSIONS} != "true" ]] ; then
35 + echo -e "${BAD}Could not find requested Python ${version}${NORMAL}"
36 + exit_status="1"
37 fi
38 done
39
40 --
41 1.8.4.3

Replies