mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Allrun: run in non-test mode. Handle ./Alltest correctly
This commit is contained in:
@ -51,6 +51,7 @@ do
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
-t | -test)
|
-t | -test)
|
||||||
passArgs="-test"
|
passArgs="-test"
|
||||||
|
runTests=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-s | -skipFirst)
|
-s | -skipFirst)
|
||||||
@ -64,10 +65,14 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# If an argument is supplied do not execute ./Allrun to avoid recursion
|
# If an argument is supplied do not execute ./Allrun to avoid recursion
|
||||||
if ! $skipFirst && [ -f "./Allrun" ]
|
if ! $skipFirst && $runTests && [ -f "./Alltest" ]
|
||||||
|
then
|
||||||
|
# Run speciallised Alltest script.
|
||||||
|
./Alltest $passArgs $*
|
||||||
|
elif ! $skipFirst && [ -f "./Allrun" ]
|
||||||
then
|
then
|
||||||
# Run specialised Allrun script.
|
# Run specialised Allrun script.
|
||||||
./Allrun $passArgs
|
./Allrun $passArgs $*
|
||||||
elif [ -d system ]
|
elif [ -d system ]
|
||||||
then
|
then
|
||||||
# Run normal case.
|
# Run normal case.
|
||||||
@ -89,7 +94,7 @@ else
|
|||||||
# Run all cases which have not already been run
|
# Run all cases which have not already been run
|
||||||
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs \
|
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs \
|
||||||
FOAM_TARGETS="$FOAM_TARGETS" \
|
FOAM_TARGETS="$FOAM_TARGETS" \
|
||||||
FOAM_APP="$thisScript" FOAM_ARGS="$passArgs"
|
FOAM_APP="$thisScript" FOAM_ARGS="$passArgs $*"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -124,7 +124,7 @@ logReport()
|
|||||||
if [ -z "$optCollectOnly" ]
|
if [ -z "$optCollectOnly" ]
|
||||||
then
|
then
|
||||||
# Recursively run all tutorials
|
# Recursively run all tutorials
|
||||||
foamRunTutorials -test -skipFirst
|
foamRunTutorials -skipFirst $*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -244,7 +244,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
cp -f $FOAM_TUTORIALS/Allrun .
|
cp -f $FOAM_TUTORIALS/Allrun .
|
||||||
./Allrun
|
./Allrun -test
|
||||||
|
|
||||||
sed -e :a -e '/\\$/N; s/\\\n//; ta' Allrun > temp
|
sed -e :a -e '/\\$/N; s/\\\n//; ta' Allrun > temp
|
||||||
APPLICATIONS=\
|
APPLICATIONS=\
|
||||||
|
|||||||
16
tutorials/IO/fileHandler/Alltest
Executable file
16
tutorials/IO/fileHandler/Alltest
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# Reset the controlDict
|
||||||
|
if [ -f system/controlDict.orig ]
|
||||||
|
then
|
||||||
|
echo "$0: restoring the controlDict from controlDict.orig"
|
||||||
|
mv system/controlDict.orig system/controlDict
|
||||||
|
fi
|
||||||
|
|
||||||
|
./Allrun
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user