The OpenFOAM development repository is currently offline for maintenance - sorry for any inconvenience

Commit 3a9e473e authored by Mark Olesen's avatar Mark Olesen

TUT: update run/clean scripts

parent 9d9f9449
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/LogFunctions # Tutorial log-file functions
echo "--------"
echo "Cleaning tutorials ..."
echo "Removing backup files"
find . \( \
-name '*~' -o -name '*.bak' \
-name core -o -name 'core.[1-9]*' \
-name '*.pvs' -o -name '*.OpenFOAM' -name '*.foam' \
\) -type f -delete
rm -f logs testLoopReport > /dev/null 2>&1
removeLogs
echo "Cleaning tutorials"
foamCleanTutorials cases
echo "--------"
......
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# Script
# Allrun
#
# Description
# Run tutorial cases and summarize the outcome as 'testLoopReport'
#
#------------------------------------------------------------------------------
cd ${0%/*} || exit 1 # Run from this directory
usage()
{
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: ${0##*/} [OPTION]
options:
-collect Collect logs only. Can be useful for aborted runs.
-help print the usage
Run tutorial cases and summarize the outcome as 'testLoopReport'
USAGE
exit 1
}
#------------------------------------------------------------------------------
unset optCollectOnly
for tutName in simpleslope entrainment
# Parse options
while [ "$#" -gt 0 ]
do
echo
echo "running tutorial case $tutName"
echo
(cd $tutName && ./Allrun)
case "$1" in
-h | -help)
usage
;;
-collect)
optCollectOnly=true
;;
-test) # Known options that should be passed through
break
;;
-*)
usage "unknown option: $1"
;;
*)
break
;;
esac
shift
done
#------------------------------------------------------------------------------
. $WM_PROJECT_DIR/bin/tools/LogFunctions # Tutorial log-file functions
if [ -z "$optCollectOnly" ]
then
foamRunTutorials -skipFirst $* # Run tutorials recursively
fi
collectLogs
#------------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment