BUG: sourced incorrect LogFunctions location

- cleanup the run script syntax
This commit is contained in:
Mark Olesen
2019-11-08 13:14:14 +01:00
committed by Andrew Heather
parent cc5fac8299
commit 784d3ad5d4
2 changed files with 12 additions and 13 deletions

View File

@ -7,7 +7,7 @@
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation # Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2018 OpenCFD Ltd. # Copyright (C) 2018-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, licensed under GNU General Public License # This file is part of OpenFOAM, licensed under GNU General Public License
@ -25,19 +25,18 @@
# When this is detected, the case will be skipped. # When this is detected, the case will be skipped.
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
# Normally use standard "make" # Normally use standard "make"
make="make" make="make"
thisScript=$0 thisScript="$0"
if [ "/${thisScript#/}" != "$thisScript" ] if [ "/${thisScript#/}" != "$thisScript" ]
then then
thisScript="$PWD/$thisScript" thisScript="$PWD/$thisScript"
fi fi
unset passArgs runTests unset passArgs runTests skipFirst
skipFirst=false
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -59,17 +58,17 @@ do
shift shift
done done
if ! $skipFirst && $runTests && test -f Alltest if [ -z "$skipFirst" ] && [ -n "$runTests" ] && test -f Alltest
then then
# Run specialized Alltest script # Run specialized Alltest script
./Alltest $passArgs $* ./Alltest $passArgs $*
elif ! $skipFirst && test -f Allrun elif [ -z "$skipFirst" ] && test -f Allrun
then then
# Run specialized Allrun script # Run specialized Allrun script
./Allrun $passArgs $* ./Allrun $passArgs $*
elif ! $skipFirst && test -f Allrun-optional elif [ -z "$skipFirst" ] && test -f Allrun-optional
then then
# Found Allrun-optional script - skip this tutorial. # Has Allrun-optional script - skip this tutorial.
echo "Skipped optional case $PWD" echo "Skipped optional case $PWD"
elif [ -d system ] elif [ -d system ]
then then
@ -80,9 +79,9 @@ else
# Loop over sub-directories and compile any applications # Loop over sub-directories and compile any applications
for caseName in * for caseName in *
do do
if [ -d $caseName -a -d "$caseName/Make" ] if [ -d "$caseName" ] && [ -d "$caseName/Make" ]
then then
( compileApplication $caseName ) ( compileApplication "$caseName" )
fi fi
done done
FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs) FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs)

View File

@ -67,11 +67,11 @@ do
done done
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
. ${WM_PROJECT_DIR:?}/bin/LogFunctions # Tutorial log-file functions . ${WM_PROJECT_DIR:?}/bin/tools/LogFunctions # Tutorial log-file functions
if [ -z "$optCollect" ] if [ -z "$optCollect" ]
then then
foamRunTutorials -skipFirst $* # Run tutorials recursively foamRunTutorials -skipFirst $* # Run recursively
fi fi
collectLogs collectLogs