From b5d4d59ff139452c8f5e50a17db7e3cc855d0ce2 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 27 Nov 2018 11:11:47 +0100 Subject: [PATCH] TUT: add Alltest for IO/dictionary - runs in non-verbose mode to avoid spurious detection of FatalError --- tutorials/IO/dictionary/Allclean | 7 +++++++ tutorials/IO/dictionary/Allrun | 2 +- tutorials/IO/dictionary/Alltest | 7 +++++++ tutorials/IO/dictionary/TestParsing | 17 +++++++++-------- 4 files changed, 24 insertions(+), 9 deletions(-) create mode 100755 tutorials/IO/dictionary/Allclean create mode 100755 tutorials/IO/dictionary/Alltest diff --git a/tutorials/IO/dictionary/Allclean b/tutorials/IO/dictionary/Allclean new file mode 100755 index 0000000000..3ae1b034df --- /dev/null +++ b/tutorials/IO/dictionary/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# No application, so need to clean manually +rm log.* + +#------------------------------------------------------------------------------ diff --git a/tutorials/IO/dictionary/Allrun b/tutorials/IO/dictionary/Allrun index 850ea90ee4..2c4c344ab2 100755 --- a/tutorials/IO/dictionary/Allrun +++ b/tutorials/IO/dictionary/Allrun @@ -2,6 +2,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions -runApplication ./TestParsing "$@" +runApplication ./TestParsing -verbose "$@" #------------------------------------------------------------------------------ diff --git a/tutorials/IO/dictionary/Alltest b/tutorials/IO/dictionary/Alltest new file mode 100755 index 0000000000..850ea90ee4 --- /dev/null +++ b/tutorials/IO/dictionary/Alltest @@ -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 "$@" + +#------------------------------------------------------------------------------ diff --git a/tutorials/IO/dictionary/TestParsing b/tutorials/IO/dictionary/TestParsing index 7ff9d065d1..973b887497 100755 --- a/tutorials/IO/dictionary/TestParsing +++ b/tutorials/IO/dictionary/TestParsing @@ -4,24 +4,24 @@ cd ${0%/*} || exit 1 # Run from this directory echo "dictionary input tests" -verbose=true +verbose=false npass=0 nwarn=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 || { echo "Error: non-functional foamDictionary" exit 2 } -# Reduced verbosity in test mode? -if isTest "$@" -then - verbose=false -fi - - for dict in \ good*.dict \ warn*.dict \ @@ -104,6 +104,7 @@ then echo End echo else + echo "Found $nfail FatalErrors" exit 1 fi