2 #---------------------------------*- sh -*-------------------------------------
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
6 # \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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 #------------------------------------------------------------------------------
32 cd ${0%/*} ||
exit 1 # run from this directory
34 # Source tutorial run functions
35 .
$WM_PROJECT_DIR/bin
/tools
/RunFunctions
38 # Extracts useful info from log file.
40 case=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
41 app
=`echo $1 | sed s/"\(.*\)\."/""/g`
42 appAndCase
="Application $app - case $case"
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 **"
54 elif [ "$UxSS" -a "$UySS" -a "$UzSS" ]
56 echo "$appAndCase: ** Solution singularity **"
60 completionTime
=`tail -10 $log | grep Execution | cut -d= -f2 | sed 's/^[ \t]*//'`
61 if [ "$completionTime" ]
63 completionTime
="in $completionTime"
65 echo "$appAndCase: completed $completionTime"
68 echo "$appAndCase: unconfirmed completion"
73 # Recursively run all tutorials
74 foamRunTutorials cases
77 # Analyse all log files
78 rm testLoopReport
> /dev
/null
2>&1 &
82 if [ -d $application ]
85 for log
in `find . -name "log.*" | xargs ls -rt`
87 logReport
$log >> ..
/testLoopReport
89 echo "" >> ..
/testLoopReport
94 find .
-name "log.*" -exec cat {} \
; >> logs
96 # ----------------------------------------------------------------- end-of-file