mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added -root option to tutorial Alltest to initiate test from specifoed root folder
This commit is contained in:
@ -39,6 +39,7 @@ usage()
|
||||
usage: ${0##*/} [OPTION]
|
||||
|
||||
options:
|
||||
-root <dir> specify root folder to run tests from
|
||||
-default sets up a default scheme on all schemes
|
||||
-help print the usage
|
||||
|
||||
@ -52,16 +53,22 @@ USAGE
|
||||
|
||||
unset DEFAULT_SCHEMES
|
||||
|
||||
ROOT="./"
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-r | -root)
|
||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||
ROOT="$2"
|
||||
shift
|
||||
;;
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
-d | -default)
|
||||
DEFAULT_SCHEMES=true
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
usage "unknown option: '$*'"
|
||||
@ -70,6 +77,7 @@ do
|
||||
break
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
@ -123,7 +131,7 @@ done
|
||||
[ -f "$MAIN_CONTROL_DICT" ] || usage "main controlDict not found"
|
||||
|
||||
|
||||
TUTORIALS_DIR=.
|
||||
TUTORIALS_DIR=$ROOT
|
||||
TEST_RUN_DIR=../tutorialsTest
|
||||
FV_SCHEMES=\
|
||||
" \
|
||||
@ -198,8 +206,10 @@ then
|
||||
done
|
||||
fi
|
||||
|
||||
cp -f $FOAM_TUTORIALS/Allrun .
|
||||
./Allrun
|
||||
|
||||
|
||||
sed -e :a -e '/\\$/N; s/\\\n//; ta' Allrun > temp
|
||||
APPLICATIONS=\
|
||||
`grep "applications=" temp | sed 's/applications=\"\([A-Za-z \t]*\)\"/\1/g'`
|
||||
|
||||
Reference in New Issue
Block a user