TUT: add Alltest for IO/dictionary

- runs in non-verbose mode to avoid spurious detection of FatalError
This commit is contained in:
Mark Olesen
2018-11-27 11:11:47 +01:00
parent 61c1aa161c
commit b5d4d59ff1
4 changed files with 24 additions and 9 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# No application, so need to clean manually
rm log.*
#------------------------------------------------------------------------------

View File

@ -2,6 +2,6 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
runApplication ./TestParsing "$@" runApplication ./TestParsing -verbose "$@"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
runApplication ./TestParsing "$@"
#------------------------------------------------------------------------------

View File

@ -4,24 +4,24 @@ cd ${0%/*} || exit 1 # Run from this directory
echo "dictionary input tests" echo "dictionary input tests"
verbose=true verbose=false
npass=0 npass=0
nwarn=0 nwarn=0
nfail=0 nfail=0
# Increase verbosity on demand, with the -verbose flag
for i in "$@"
do
case "$i" in (-verbose*) verbose=true ;; esac
done
foamDictionary -help > /dev/null 2>&1 || { foamDictionary -help > /dev/null 2>&1 || {
echo "Error: non-functional foamDictionary" echo "Error: non-functional foamDictionary"
exit 2 exit 2
} }
# Reduced verbosity in test mode?
if isTest "$@"
then
verbose=false
fi
for dict in \ for dict in \
good*.dict \ good*.dict \
warn*.dict \ warn*.dict \
@ -104,6 +104,7 @@ then
echo End echo End
echo echo
else else
echo "Found $nfail FatalErrors"
exit 1 exit 1
fi fi