This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/testHarness/foam-extend/4.1/runDir/Allrun_Nightly
2018-02-20 17:56:27 +00:00

106 lines
3.5 KiB
Bash
Executable file

#!/bin/bash
# /*-------------------------------------------------------------------------*\
# ========= |
# \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration |
# \\ / A nd | For copyright notice see file Copyright
# \\/ M anipulation |
# -----------------------------------------------------------------------------
# License
# This file is part of foam-extend.
#
# foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Description
# Allrun file for running the FOAM test harness
#
# Author
# Martin Beaudoin, Hydro-Quebec, 2010. All rights reserved
#
#
# \*-------------------------------------------------------------------------*/
#set -x
# This environment variable must point to the location of the test harness
# main directory
export FOAM_TEST_HARNESS_DIR=$(dirname $PWD)
# First, some sanity checks
#
# We need $WM_PROJECT_DIR
if [ -z "$WM_PROJECT_DIR" ]
then
echo "Warning:"
echo " Missing environment variable \$WM_PROJECT_DIR. Stopping."
echo " Please make sure your FOAM environment is properly set up."
exit -1
fi
# We need $WM_PROJECT_DIR/CMakeLists.txt
if [ ! -e $WM_PROJECT_DIR/CMakeLists.txt ]
then
echo "Warning:"
echo " Missing file: CMakeLists.txt under \$WM_PROJECT_DIR. Stopping."
echo " A copy of CMakeLists.txt is available under $FOAM_TEST_HARNESS_DIR/CMakeFiles."
echo " Please make a copy of this file under your FOAM installation directory \$WM_PROJECT_DIR."
exit -1
fi
# We also need $WM_PROJECT_DIR/CTestConfig.cmake
if [ ! -e $WM_PROJECT_DIR/CTestConfig.cmake ]
then
echo "Warning:"
echo " Missing file: CTestConfig.cmake under \$WM_PROJECT_DIR. Stopping."
echo " A copy of CTestConfig.cmake for foam-extend is available under $FOAM_TEST_HARNESS_DIR/CMakeFiles."
echo " For a copy of CTestConfig.cmake for your local CDash server, contact your local CDash admin."
echo " Please make a copy of this file under \$WM_PROJECT_DIR/CTestConfig.cmake."
exit -1
fi
# Install Hydro-Quebec Tools if necessary
command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
if [ $? -ne 0 ];
then
${WM_THIRD_PARTY_DIR}/AllMake.stage6
fi
# Make sure the CMake and tutorials runtime files are updated
# We need cmake version 2.8.0 at least
if [ "$WM_ARCH_BASE" == "mingw" ]
then
cmake $WM_PROJECT_DIR -G "MSYS Makefiles"
else
cmake $WM_PROJECT_DIR -G "Unix Makefiles"
fi
# All set. Now we can run the available test harness
#
# Invoke make help for the complete list of available commands.
#
# User-demand testing.
#
# The old way. Still valid, but not supporting subprojects
# Will do: ExperimentalBuild + ExperimentalTest + ExperimentalSubmit
#make Experimental
#
# Nightly testing
# Will do: NightlyUpdate + NightlyBuild + NightlyTest + NightlySubmit
# make Nightly
# The new way. With support for subprojects
ctest -V -S ./Dashboard_Tutorials.cmake,Nightly
# That's it