[gentoo-portage-dev] [PATCH 2/3] runtests: hardfail when a requested version is not found

2014-01-05 Thread Mike Frysinger
This way people don't have to worry about runtests.sh passing for a
specific version when it wasn't found in the system.
---
 runtests.sh | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/runtests.sh b/runtests.sh
index 3006be5..2870907 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -30,15 +30,18 @@ interrupted() {
 trap interrupted SIGINT
 
 unused_args=()
+IGNORE_MISSING_VERSIONS=true
 
 while [ $# -gt 0 ] ; do
case $1 in
--python-versions=*)
PYTHON_VERSIONS=${1#--python-versions=}
+   IGNORE_MISSING_VERSIONS=false
;;
--python-versions)
shift
PYTHON_VERSIONS=$1
+   IGNORE_MISSING_VERSIONS=false
;;
*)
unused_args[${#unused_args[@]}]=$1
@@ -73,6 +76,9 @@ for version in ${PYTHON_VERSIONS}; do
exit_status=1
fi
echo
+   elif [[ ${IGNORE_MISSING_VERSIONS} != true ]] ; then
+   echo -e ${BAD}Could not find requested Python 
${version}${NORMAL}
+   exit_status=1
fi
 done
 
-- 
1.8.4.3




Re: [gentoo-portage-dev] [PATCH 2/3] runtests: hardfail when a requested version is not found

2014-01-05 Thread Brian Dolbec
On Sun, 2014-01-05 at 10:50 -0500, Mike Frysinger wrote:
 This way people don't have to worry about runtests.sh passing for a
 specific version when it wasn't found in the system.
 ---
  runtests.sh | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/runtests.sh b/runtests.sh
 index 3006be5..2870907 100755
 --- a/runtests.sh
 +++ b/runtests.sh
 @@ -30,15 +30,18 @@ interrupted() {
  trap interrupted SIGINT
  
  unused_args=()
 +IGNORE_MISSING_VERSIONS=true
  
  while [ $# -gt 0 ] ; do
   case $1 in
   --python-versions=*)
   PYTHON_VERSIONS=${1#--python-versions=}
 + IGNORE_MISSING_VERSIONS=false
   ;;
   --python-versions)
   shift
   PYTHON_VERSIONS=$1
 + IGNORE_MISSING_VERSIONS=false
   ;;
   *)
   unused_args[${#unused_args[@]}]=$1
 @@ -73,6 +76,9 @@ for version in ${PYTHON_VERSIONS}; do
   exit_status=1
   fi
   echo
 + elif [[ ${IGNORE_MISSING_VERSIONS} != true ]] ; then
 + echo -e ${BAD}Could not find requested Python 
 ${version}${NORMAL}
 + exit_status=1
   fi
  done
  
 looks good to me, do it :)



signature.asc
Description: This is a digitally signed message part