From 44052de594dc009dea7b97a646a891f65d6021af Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 6 Aug 2020 18:25:56 +0200 Subject: [PATCH] TUT: skip some tutorials when dynamicCode is not available - silence failed restoration of controlDict from controlDict.orig (idempotent?) --- tutorials/IO/dictionary/TestParsing | 9 +++++++++ tutorials/basic/potentialFoam/cylinder/Allrun | 2 ++ .../combustion/XiDyMFoam/oscillatingCylinder/Allrun | 11 +++++++++++ tutorials/combustion/XiEngineFoam/kivaTest/Allrun | 2 ++ .../overRhoPimpleDyMFoam/twoSimpleRotors/Allrun | 2 ++ .../rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun | 2 ++ .../rhoPorousSimpleFoam/angledDuct/implicit/Allrun | 2 ++ .../pimpleFoam/LES/periodicHill/steadyState/Allrun | 2 ++ .../pimpleFoam/LES/periodicHill/transient/Allrun | 2 ++ .../pimpleFoam/laminar/cylinder2D/Allrun | 2 ++ tutorials/incompressible/simpleFoam/bump2D/Allrun | 2 ++ tutorials/incompressible/simpleFoam/pipeCyclic/Allrun | 2 ++ tutorials/mesh/moveDynamicMesh/twistingColumn/Allrun | 11 +++++++++++ .../poolEvaporation/Allrun | 2 ++ .../multiphase/interFoam/RAS/floatingObject/Allrun | 2 ++ .../overInterDyMFoam/floatingBody/background/Allrun | 11 +++++++++++ .../floatingBodyWithSpring/background/Allrun.pre | 2 ++ .../overInterDyMFoam/twoSimpleRotors/Allrun | 2 ++ .../RAS/wallBoiling1D_2phase/Allclean | 2 +- .../RAS/wallBoiling1D_3phase/Allclean | 2 +- .../RAS/wallBoiling/Allclean | 2 +- .../RAS/wallBoiling1D/Allclean | 2 +- .../RAS/wallBoilingIATE/Allclean | 2 +- .../laminar/bubbleColumnEvaporating/Allrun | 2 ++ 24 files changed, 77 insertions(+), 5 deletions(-) create mode 100755 tutorials/combustion/XiDyMFoam/oscillatingCylinder/Allrun create mode 100755 tutorials/mesh/moveDynamicMesh/twistingColumn/Allrun create mode 100755 tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun diff --git a/tutorials/IO/dictionary/TestParsing b/tutorials/IO/dictionary/TestParsing index c557480f8f..507ddd1406 100755 --- a/tutorials/IO/dictionary/TestParsing +++ b/tutorials/IO/dictionary/TestParsing @@ -23,6 +23,10 @@ foamDictionary -help > /dev/null 2>&1 || { } +# Some tests may need #calc +unset noDynamicCode +canCompile || noDynamicCode=true + for dict in \ good*.dict \ warn*.dict \ @@ -31,6 +35,11 @@ for dict in \ do [ -f "$dict" ] || continue # protect against bad globs + if [ "$noDynamicCode" = true ] && grep -q '#calc' "$dict" + then + continue + fi + # capture stderr, ignore stdout stderr=$(foamDictionary -keywords $dict 2>&1 >/dev/null) exitCode=$? diff --git a/tutorials/basic/potentialFoam/cylinder/Allrun b/tutorials/basic/potentialFoam/cylinder/Allrun index 6a6f537d8e..bb5de14101 100755 --- a/tutorials/basic/potentialFoam/cylinder/Allrun +++ b/tutorials/basic/potentialFoam/cylinder/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + restore0Dir runApplication blockMesh runApplication $(getApplication) -withFunctionObjects -writePhi -writep diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/Allrun b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/Allrun new file mode 100755 index 0000000000..588af966ba --- /dev/null +++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/Allrun @@ -0,0 +1,11 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +canCompile || exit 0 # Dynamic code + +runApplication blockMesh +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiEngineFoam/kivaTest/Allrun b/tutorials/combustion/XiEngineFoam/kivaTest/Allrun index 127326bf64..3c4dc68694 100755 --- a/tutorials/combustion/XiEngineFoam/kivaTest/Allrun +++ b/tutorials/combustion/XiEngineFoam/kivaTest/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + runApplication kivaToFoam -file otape17 runApplication $(getApplication) diff --git a/tutorials/compressible/overRhoPimpleDyMFoam/twoSimpleRotors/Allrun b/tutorials/compressible/overRhoPimpleDyMFoam/twoSimpleRotors/Allrun index 4e50485939..b8298f5b41 100755 --- a/tutorials/compressible/overRhoPimpleDyMFoam/twoSimpleRotors/Allrun +++ b/tutorials/compressible/overRhoPimpleDyMFoam/twoSimpleRotors/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + ./Allrun.pre # Serial diff --git a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun index 8bd99d3333..d46e9f2eab 100755 --- a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun +++ b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + restore0Dir runApplication blockMesh runApplication -s preProcess $(getApplication) -postProcess -dict system/preProcess diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun index e73a311ec5..d2721c1300 100755 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + echo "Use common files for 0/, constant/ and blockMeshDict" rm -rf 0 constant \cp -r ../common/0.orig 0 diff --git a/tutorials/incompressible/pimpleFoam/LES/periodicHill/steadyState/Allrun b/tutorials/incompressible/pimpleFoam/LES/periodicHill/steadyState/Allrun index f1b728c781..916e7a1336 100755 --- a/tutorials/incompressible/pimpleFoam/LES/periodicHill/steadyState/Allrun +++ b/tutorials/incompressible/pimpleFoam/LES/periodicHill/steadyState/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + runApplication blockMesh runApplication topoSet diff --git a/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/Allrun b/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/Allrun index 6bcadb8779..326e59b8e9 100755 --- a/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/Allrun +++ b/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + echo "Linking processor*/ directory" for proc in $(\ls -d ../steadyState/processor*) do diff --git a/tutorials/incompressible/pimpleFoam/laminar/cylinder2D/Allrun b/tutorials/incompressible/pimpleFoam/laminar/cylinder2D/Allrun index 0307797569..7b73c7f633 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/cylinder2D/Allrun +++ b/tutorials/incompressible/pimpleFoam/laminar/cylinder2D/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + ./Allrun.pre runApplication decomposePar diff --git a/tutorials/incompressible/simpleFoam/bump2D/Allrun b/tutorials/incompressible/simpleFoam/bump2D/Allrun index 6f65a7144d..9d8fad99b4 100755 --- a/tutorials/incompressible/simpleFoam/bump2D/Allrun +++ b/tutorials/incompressible/simpleFoam/bump2D/Allrun @@ -4,6 +4,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + runApplication blockMesh # Turbulence closure models diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun index 1250aae46f..8813c7c6c3 100755 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + runApplication blockMesh runApplication topoSet runApplication refineHexMesh c0 -overwrite diff --git a/tutorials/mesh/moveDynamicMesh/twistingColumn/Allrun b/tutorials/mesh/moveDynamicMesh/twistingColumn/Allrun new file mode 100755 index 0000000000..588af966ba --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/twistingColumn/Allrun @@ -0,0 +1,11 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +canCompile || exit 0 # Dynamic code + +runApplication blockMesh +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/Allrun b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/Allrun index e2f1c31545..6a7592f324 100755 --- a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/Allrun +++ b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/poolEvaporation/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + restore0Dir runApplication blockMesh diff --git a/tutorials/multiphase/interFoam/RAS/floatingObject/Allrun b/tutorials/multiphase/interFoam/RAS/floatingObject/Allrun index ea261501e5..76d3c8b003 100755 --- a/tutorials/multiphase/interFoam/RAS/floatingObject/Allrun +++ b/tutorials/multiphase/interFoam/RAS/floatingObject/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + runApplication blockMesh runApplication topoSet runApplication subsetMesh -overwrite c0 -patch floatingObject diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun b/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun new file mode 100755 index 0000000000..588af966ba --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun @@ -0,0 +1,11 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +canCompile || exit 0 # Dynamic code + +runApplication blockMesh +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allrun.pre index 49cd5f48ba..5b81a3f410 100755 --- a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allrun.pre +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allrun.pre @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + # Create background mesh runApplication blockMesh diff --git a/tutorials/multiphase/overInterDyMFoam/twoSimpleRotors/Allrun b/tutorials/multiphase/overInterDyMFoam/twoSimpleRotors/Allrun index ec34dab2ef..85ec45dcbb 100755 --- a/tutorials/multiphase/overInterDyMFoam/twoSimpleRotors/Allrun +++ b/tutorials/multiphase/overInterDyMFoam/twoSimpleRotors/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + ./Allrun.pre # Serial diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allclean b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allclean index 12a3a8379b..dc652bc91a 100755 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allclean +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allclean @@ -8,7 +8,7 @@ cleanCase0 if notTest $@ then - mv -f system/controlDict.orig system/controlDict + mv -f system/controlDict.orig system/controlDict 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allclean b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allclean index 12a3a8379b..dc652bc91a 100755 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allclean +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allclean @@ -8,7 +8,7 @@ cleanCase0 if notTest $@ then - mv -f system/controlDict.orig system/controlDict + mv -f system/controlDict.orig system/controlDict 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean index 12a3a8379b..dc652bc91a 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean @@ -8,7 +8,7 @@ cleanCase0 if notTest $@ then - mv -f system/controlDict.orig system/controlDict + mv -f system/controlDict.orig system/controlDict 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allclean b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allclean index 12a3a8379b..dc652bc91a 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allclean +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allclean @@ -8,7 +8,7 @@ cleanCase0 if notTest $@ then - mv -f system/controlDict.orig system/controlDict + mv -f system/controlDict.orig system/controlDict 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean index 12a3a8379b..dc652bc91a 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean @@ -8,7 +8,7 @@ cleanCase0 if notTest $@ then - mv -f system/controlDict.orig system/controlDict + mv -f system/controlDict.orig system/controlDict 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/Allrun index cc36822e88..ae55e3a031 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/Allrun +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/Allrun @@ -3,6 +3,8 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ +canCompile || exit 0 # Dynamic code + restore0Dir runApplication blockMesh