2 #------------------------------------------------------------------------------
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
6 # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
8 #------------------------------------------------------------------------------
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
30 #------------------------------------------------------------------------------
31 cd ${0%/*} ||
exit 1 # run from this directory
33 # Source tutorial run functions
34 .
$WM_PROJECT_DIR/bin
/tools
/RunFunctions
37 # Extracts useful info from log file.
40 caseName
=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
41 app
=`echo $1 | sed s/"\(.*\)\."/""/g`
42 appAndCase
="Application $app - case $caseName"
44 fatalError
=`grep "FOAM FATAL" $1`
45 UxSS
=`grep -E "Ux[:| ]*solution singularity" $1`
46 UySS
=`grep -E "Uy[:| ]*solution singularity" $1`
47 UzSS
=`grep -E "Uz[:| ]*solution singularity" $1`
48 completed
=`grep -E "^[\t ]*[eE]nd" $1`
52 echo "$appAndCase: ** FOAM FATAL ERROR **"
53 elif [ "$UxSS" -a "$UySS" -a "$UzSS" ]
55 echo "$appAndCase: ** Solution singularity **"
58 completionTime
=`tail -10 $log | grep Execution | cut -d= -f2 | sed 's/^[ \t]*//'`
59 if [ "$completionTime" ]
61 completionTime
="in $completionTime"
63 echo "$appAndCase: completed $completionTime"
65 echo "$appAndCase: unconfirmed completion"
70 # Recursively run all tutorials
71 foamRunTutorials cases
74 # Analyse all log files
75 rm testLoopReport
> /dev
/null
2>&1 &
81 [ -d $appDir ] && cd $appDir ||
exit
83 for log
in `find . -name "log.*" | xargs ls -rt`
85 logReport
$log >> ..
/testLoopReport
87 echo "" >> ..
/testLoopReport
91 find .
-name "log.*" -exec cat {} \
; >> logs
93 # ----------------------------------------------------------------- end-of-file