diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index d9712dea2cc82c094f63d8c35b44a964da7f4357..f7909c7518499d1955833ca215d882d42f3793b6 100644
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -3,7 +3,7 @@
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
 #   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-#    \\/     M anipulation  | Copyright (C) 2015-2017 OpenCFD Ltd.
+#    \\/     M anipulation  | Copyright (C) 2015-2018 OpenCFD Ltd.
 #------------------------------------------------------------------------------
 # License
 #     This file is part of OpenFOAM, licensed under GNU General Public License
@@ -24,7 +24,7 @@
 #------------------------------------------------------------------------------
 
 #
-# Look for '-parallel' in the argument list.
+# Check presence of '-parallel' in the argument list.
 #
 isParallel()
 {
@@ -34,7 +34,7 @@ isParallel()
 
 
 #
-# Look for '-test' in the argument list.
+# Check presence of '-test' in the argument list.
 #
 isTest()
 {
@@ -42,6 +42,15 @@ isTest()
     return 1
 }
 
+#
+# Check absence of '-test' in the argument list.
+#
+notTest()
+{
+    for i; do [ "$i" = "-test" ] && return 1; done
+    return 0
+}
+
 
 #
 # Extract 'numberOfSubdomains' from system/decomposeParDict
diff --git a/tutorials/combustion/XiFoam/RAS/Allrun b/tutorials/combustion/XiFoam/RAS/Allrun
index 6871fc1cc2223f54642d436f1e52ebd83d75dfe1..18ba9615c03c3d6d250567093c08ab58428c1f99 100755
--- a/tutorials/combustion/XiFoam/RAS/Allrun
+++ b/tutorials/combustion/XiFoam/RAS/Allrun
@@ -20,7 +20,7 @@ setCombustionProperties()
 # Do moriyoshiHomogeneous
 ( cd moriyoshiHomogeneous && foamRunTutorials )
 
-if ! isTest $@
+if notTest $@
 then
     # Clone case for second phase
     cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
diff --git a/tutorials/combustion/chemFoam/gri/Allrun b/tutorials/combustion/chemFoam/gri/Allrun
index 822fbd8972c5f3d0ea0870daf333480c33f75045..ef926b994cc1e45468697c8e7182e8d357d11950 100755
--- a/tutorials/combustion/chemFoam/gri/Allrun
+++ b/tutorials/combustion/chemFoam/gri/Allrun
@@ -9,7 +9,7 @@ runApplication chemkinToFoam \
 
 runApplication $(getApplication)
 
-if ! isTest $@
+if notTest $@
 then
     (cd validation && ./Allrun $*)
 fi
diff --git a/tutorials/combustion/chemFoam/h2/Allrun b/tutorials/combustion/chemFoam/h2/Allrun
index d0f65aed57120d019a891d54b1736d9fb97e3264..5afa0c541e69cdfdbb28bf7847e45b26369e479d 100755
--- a/tutorials/combustion/chemFoam/h2/Allrun
+++ b/tutorials/combustion/chemFoam/h2/Allrun
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 
 runApplication $(getApplication)
 
-if ! isTest $@
+if notTest $@
 then
     (cd validation && ./Allrun $*)
 fi
diff --git a/tutorials/combustion/chemFoam/ic8h18/Allrun b/tutorials/combustion/chemFoam/ic8h18/Allrun
index d0f65aed57120d019a891d54b1736d9fb97e3264..5afa0c541e69cdfdbb28bf7847e45b26369e479d 100755
--- a/tutorials/combustion/chemFoam/ic8h18/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18/Allrun
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 
 runApplication $(getApplication)
 
-if ! isTest $@
+if notTest $@
 then
     (cd validation && ./Allrun $*)
 fi
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
index d0f65aed57120d019a891d54b1736d9fb97e3264..5afa0c541e69cdfdbb28bf7847e45b26369e479d 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 
 runApplication $(getApplication)
 
-if ! isTest $@
+if notTest $@
 then
     (cd validation && ./Allrun $*)
 fi
diff --git a/tutorials/combustion/chemFoam/nc7h16/Allrun b/tutorials/combustion/chemFoam/nc7h16/Allrun
index d0f65aed57120d019a891d54b1736d9fb97e3264..5afa0c541e69cdfdbb28bf7847e45b26369e479d 100755
--- a/tutorials/combustion/chemFoam/nc7h16/Allrun
+++ b/tutorials/combustion/chemFoam/nc7h16/Allrun
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 
 runApplication $(getApplication)
 
-if ! isTest $@
+if notTest $@
 then
     (cd validation && ./Allrun $*)
 fi
diff --git a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
index 7916c6e143fdfd95e2325e53a1472b8b32409b70..b8fad2b17f9ccdd6a185ac37129f60f4a406adea 100755
--- a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
+++ b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
@@ -21,7 +21,7 @@ runParallel $(getApplication)
 paraFoam -touch
 paraFoam -touch -region panelRegion
 
-if ! isTest $@
+if notTest $@
 then
     (cd validation && ./createGraphs)
 fi
diff --git a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun
index 37f0be5d56bd57cd5ca6918894c54739a3f1589f..7ba247920bbf18ee37138a5dd279325348fae0be 100755
--- a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun
+++ b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun
@@ -8,8 +8,8 @@ application=$(getApplication)
 restore0Dir
 
 runApplication chemkinToFoam \
-               chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
-               constant/reactionsGRI constant/thermo.compressibleGasGRI
+    chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
+    constant/reactionsGRI constant/thermo.compressibleGasGRI
 
 runApplication blockMesh
 runApplication setFields
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
index 63008fb09342b88767b98a03bcb7246fda02c7b7..a8473e20701753ab626fb19df92e9769f6608fc1 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
@@ -29,7 +29,7 @@ run resolved
 # Run with the plenum modelled by a boundary condition
 run modelled
 
-if ! isTest $@
+if notTest $@
 then
     # Plot a comparison of the pressure in the neck
     cat << EOF | gnuplot -persist
diff --git a/tutorials/compressible/sonicLiquidFoam/Allrun b/tutorials/compressible/sonicLiquidFoam/Allrun
index 81160eeefcf014d726587ddb5da511ddc932b75e..539103fadd8eb738714891a94d6a6a61624610ca 100755
--- a/tutorials/compressible/sonicLiquidFoam/Allrun
+++ b/tutorials/compressible/sonicLiquidFoam/Allrun
@@ -26,7 +26,7 @@ setDecompressionTankFine()
 # Do decompressionTank
 ( cd decompressionTank && foamRunTutorials )
 
-if ! isTest $@
+if notTest $@
 then
     # Clone case
     cloneCase decompressionTank decompressionTankFine
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
index e36ed26058e87654fcca5a5bec7e9a0765994441..4c6c679c3f6b015cd369329acf66cf56c7ea05b8 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
@@ -6,7 +6,7 @@ runApplication blockMesh
 runApplication $(getApplication)
 runApplication -s sample  postProcess -latestTime -func sample
 
-if ! istest $@
+if notTest $@
 then
     runApplication validation/createGraphs
 fi
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
index 03f8f41f8f847fb7614d338ec6d3e94e5a0f4ee5..4f1949fd4691e0a017859b1c9e8ff11c369040fb 100755
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
@@ -32,7 +32,7 @@ do
     rm -rf logs
 done
 
-if ! isTest $@
+if notTest $@
 then
     # create validation plot
     # Test if gnuplot exists on the system
diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun b/tutorials/incompressible/lumpedPointMotion/building/Allrun
index b922844f842c9f61e1a5785cfb993516eba8f008..6fe2bac6528d77cffa0b99bf6583e84615208ed9 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/Allrun
+++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun
@@ -75,7 +75,7 @@ copyParallelPointDisplacement()
 # Do steady-state case
 (cd steady && foamRunTutorials)
 
-if ! isTest $@
+if notTest $@
 then
     latestTime=$(cd steady && foamListTimes -noZero -latestTime -processor)
 
diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move
index bed249580f511756863fdd71d21d85f22fc43e6d..3f539c8c7e6fecd1ef6dadbd9024c253b8cf91e5 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move
+++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move
@@ -51,7 +51,7 @@ linkParallelCase()
 # Do steady-state case
 (cd steady && ./Allrun.pre)
 
-if ! isTest $@
+if notTest $@
 then
     # Copy/link the steady-state case to movement
     linkParallelCase steady movement
diff --git a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun
index f708e6cfc09a6dd28f25ac52c8c0f60f6e1c6d63..5f0721f5904e85aac42330a6a912bc3ba2942452 100755
--- a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun
+++ b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun
@@ -15,7 +15,7 @@ runParallel $(getApplication)
 
 # Run noise tool for both point and surface
 
-if ! isTest $@
+if notTest $@
 then
     runParallel -s point noise -dict system/noiseDict-point
 
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun
index 9f48464dc2b658ee9ada8e22ad8461bc4ecedda1..cb72a01227bd995a6fba6c85d89a85dd2900f592 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 # Do the Spalart-Allmaras steady-state case
 (cd motorBike && foamRunTutorials)
 
-if ! isTest $@
+if notTest $@
 then
     # Clone the steady-state case to the LES case
     cloneParallelCase motorBike motorBikeLES
diff --git a/tutorials/mesh/foamyHexMesh/Allrun b/tutorials/mesh/foamyHexMesh/Allrun
index d8d59bb66159e3663563a2ad88e3b102bfdba2ec..dd1c7d2c4139742df7f00b37dd1953c0c5664edb 100755
--- a/tutorials/mesh/foamyHexMesh/Allrun
+++ b/tutorials/mesh/foamyHexMesh/Allrun
@@ -9,7 +9,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 ( cd blob && ./Allrun $* )
 ( cd simpleShapes && ./Allrun $* )
 
-if ! isTest $@
+if notTest $@
 then
     ( cd flange && ./Allrun $* )
     ( cd mixerVessel && ./Allrun $* )
diff --git a/tutorials/multiphase/interFoam/RAS/damBreak/Allrun b/tutorials/multiphase/interFoam/RAS/damBreak/Allrun
index aab521bd8260a4c406d3d10ea2064adef415362e..156eceb207e47389b73adb1a7c3dc5d0bbf5834f 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/damBreak/Allrun
@@ -25,7 +25,7 @@ setDamBreakFine ()
 (cd damBreak && foamRunTutorials)
 
 
-if ! isTest $@
+if notTest $@
 then
     # Clone case
     cloneCase damBreak damBreakFine
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/Allrun b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
index 91244246c5329cad850323f2b919540f4609975b..7380914b2a79dcc8f3eb7a68fd0a6306536391df 100755
--- a/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
@@ -24,7 +24,7 @@ setDamBreakFine ()
 # Do damBreak
 (cd damBreak && foamRunTutorials)
 
-if ! isTest $@
+if notTest $@
 then
     # Clone case
     cloneCase damBreak damBreakFine
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun
index a7486bdf9586884d0cfbff39063b4a0c187594ee..2d0315eac3561aaf5a67b5de83818f7e33630239 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 
 (cd eulerianInjection && ./Allrun $*)
 
-if ! isTest $@
+if notTest $@
 then
     # Note: particle data only available if running complete case
     (cd lagrangianParticleInjection && ./Allrun $*)
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
index 001a60c8fddc3f7a0082b3eb5b94b5eac71ecc35..d3afcad67dfb618db9a3d24274c46a5bb82beb2d 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 runApplication blockMesh
 runApplication $(getApplication)
 
-if ! isTest $@
+if notTest $@
 then
     foamDictionary system/controlDict -entry endTime -set 5
     foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5'
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
index 001a60c8fddc3f7a0082b3eb5b94b5eac71ecc35..d3afcad67dfb618db9a3d24274c46a5bb82beb2d 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1                        # Run from this directory
 runApplication blockMesh
 runApplication $(getApplication)
 
-if ! isTest $@
+if notTest $@
 then
     foamDictionary system/controlDict -entry endTime -set 5
     foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5'
diff --git a/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun b/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun
index 19627902c5491b1c85764859a6929aa746b6a313..e7448449c2f66eab8f655e95c8df375f85d71e0e 100755
--- a/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun
+++ b/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun
@@ -18,7 +18,7 @@ do
 
     runApplication -s ${schemeTag} scalarTransportFoam
 
-    if ! isTest $params
+    if notTest $params
     then
         # Save the line plot
         mv postProcessing/sample1/100/line1_T.xy line1_T_${schemeTag}.xy