mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
foamRunTutorials: Rationalized support for the "-test" option
RunFunctions: Added "isTest()" argument parsing function
tutorials: Updated Allrun scripts to propagate the "-test" option
tutorials: Removed the lower Alltest scripts and updated the Allrun to
use the "isTest()" function to handle test-specific operation
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -94,16 +94,17 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
passArgs=$(if $runTests; then echo "-test"; fi)
|
||||
|
||||
# If an argument is supplied do not execute ./Allrun to avoid recursion
|
||||
if ! $skipFirst && $runTests && [ -f "./Alltest" ]
|
||||
then
|
||||
# Run a special test script.
|
||||
./Alltest
|
||||
./Alltest $passArgs
|
||||
elif ! $skipFirst && [ -f "./Allrun" ]
|
||||
then
|
||||
# Specialised script.
|
||||
./Allrun
|
||||
./Allrun $passArgs
|
||||
elif [ -d system ]
|
||||
then
|
||||
# Normal case.
|
||||
@ -120,20 +121,15 @@ else
|
||||
( compileApplication $caseName )
|
||||
fi
|
||||
done
|
||||
# Recurse to subdirectories
|
||||
#for caseName in *
|
||||
#do
|
||||
# if [ -d $caseName ]
|
||||
# then
|
||||
# ( cd $caseName && $thisScript )
|
||||
# fi
|
||||
#done
|
||||
FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs)
|
||||
#$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$WM_SCHEDULER $thisScript"
|
||||
|
||||
passArgs=$(if $runTests; then echo "-test"; fi)
|
||||
#$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs \
|
||||
# FOAM_TARGETS="$FOAM_TARGETS" \
|
||||
# FOAM_APP="$WM_SCHEDULER $thisScript" FOAM_ARGS="$passArgs"
|
||||
|
||||
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$thisScript" FOAM_ARGS="$passArgs"
|
||||
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs \
|
||||
FOAM_TARGETS="$FOAM_TARGETS" \
|
||||
FOAM_APP="$thisScript" FOAM_ARGS="$passArgs"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user