ENH: downgrade error to warning in Alltest

- make adjustment of the DebugSwitches optional.
  Enable (the old behaviour) with -debug.
This commit is contained in:
Mark Olesen
2019-01-15 10:37:50 +01:00
parent 02ea8b1ce8
commit 1ce8440cec

View File

@ -33,7 +33,7 @@ usage: ${0##*/} [OPTION]
options: options:
-git Use git to retrieve the tutorials -git Use git to retrieve the tutorials
-no-git Do not use git to retrieve the tutorials -no-git Do not use git to retrieve the tutorials
-no-debug Do not adjust DebugSwitches (fvSchemes, solution) -debug Adjust DebugSwitches (fvSchemes, solution)
-root dir Specify root directory to run tests from -root dir Specify root directory to run tests from
-default Sets up a default scheme on all schemes -default Sets up a default scheme on all schemes
-help Print the usage -help Print the usage
@ -62,9 +62,9 @@ die()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
ROOT="./" ROOT="./"
adjustDebugSwitches=false
useDefaultSchemes=false useDefaultSchemes=false
useGit=auto useGit=auto
adjustDebugSwitches=true
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -84,10 +84,10 @@ do
-no-git) -no-git)
unset useGit unset useGit
;; ;;
-no-debug) -debug)
unset adjustDebugSwitches adjustDebugSwitches=true
;; ;;
-d | -default) -default)
useDefaultSchemes=true useDefaultSchemes=true
;; ;;
*) *)
@ -145,14 +145,17 @@ then
then then
if [ -e "${ETC_CONTROL_DICT}.orig" ] if [ -e "${ETC_CONTROL_DICT}.orig" ]
then then
die "File ${ETC_CONTROL_DICT}.orig already exists" \ echo "File ${ETC_CONTROL_DICT}.orig already exists" \
"Did Alltest fail in some way and then run again?" "Did Alltest fail in some way and then run again?" 2>&1
fi
echo "Not adjusting DebugSwitches ..." 2>&1
unset ETC_CONTROL_DICT
else
grep DebugSwitches "${ETC_CONTROL_DICT}" 1> /dev/null 2>&1 || { grep DebugSwitches "${ETC_CONTROL_DICT}" 1> /dev/null 2>&1 || {
echo "No DebugSwitches to adjust in ${ETC_CONTROL_DICT}" 1>&2 echo "No DebugSwitches to adjust in ${ETC_CONTROL_DICT}" 1>&2
unset ETC_CONTROL_DICT unset ETC_CONTROL_DICT
} }
fi
else else
echo "No main (user or project) controlDict to adjust" 1>&2 echo "No main (user or project) controlDict to adjust" 1>&2
unset ETC_CONTROL_DICT unset ETC_CONTROL_DICT