2010-10-07 03:00:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# /*---------------------------------------------------------------------------*\
|
|
|
|
# ========= |
|
2013-12-11 16:09:41 +00:00
|
|
|
# \\ / F ield | foam-extend: Open Source CFD
|
2010-10-07 03:00:07 +00:00
|
|
|
# \\ / O peration |
|
2013-12-11 16:09:41 +00:00
|
|
|
# \\ / A nd | For copyright notice see file Copyright
|
2010-10-07 03:00:07 +00:00
|
|
|
# \\/ M anipulation |
|
|
|
|
# -------------------------------------------------------------------------------
|
|
|
|
# License
|
2013-12-11 16:09:41 +00:00
|
|
|
# This file is part of foam-extend.
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
2013-12-11 16:09:41 +00:00
|
|
|
# foam-extend is free software: you can redistribute it and/or modify it
|
2010-10-07 03:00:07 +00:00
|
|
|
# under the terms of the GNU General Public License as published by the
|
2013-12-11 16:09:41 +00:00
|
|
|
# Free Software Foundation, either version 3 of the License, or (at your
|
2010-10-07 03:00:07 +00:00
|
|
|
# option) any later version.
|
|
|
|
#
|
2013-12-11 16:09:41 +00:00
|
|
|
# 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.
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2013-12-11 16:09:41 +00:00
|
|
|
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
# Description
|
|
|
|
# Allrun file for running the OpenFOAM Turbomachinery OSIG test harness
|
|
|
|
#
|
|
|
|
# Author
|
|
|
|
# Martin Beaudoin, Hydro-Quebec, 2010. All rights reserved
|
|
|
|
#
|
|
|
|
# \*---------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
# Environment variable : BREEDER_15_DIR:
|
|
|
|
#
|
2013-07-18 01:02:34 +00:00
|
|
|
# This environment variable must point to the location of the Breeder_1.5 section
|
2010-10-07 03:00:07 +00:00
|
|
|
# of your local working copy of the openfoam-extend Subversion repository
|
|
|
|
#
|
2013-07-18 01:02:34 +00:00
|
|
|
# Something like this:
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
# export BREEDER_15_DIR=/someAbsolutePath/Breeder_1.5
|
|
|
|
|
|
|
|
export BREEDER_OSIG_TURBOMACHINERY_DIR=${BREEDER_15_DIR}/OSIG/TurboMachinery
|
|
|
|
|
|
|
|
# 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 $BREEDER_15_DIR
|
|
|
|
if [ ! -n "${BREEDER_15_DIR}" ]
|
|
|
|
then
|
|
|
|
echo "Warning:"
|
2013-07-18 01:02:34 +00:00
|
|
|
echo " Missing environment variable \$BREEDER_15_DIR. Stopping."
|
2010-10-07 03:00:07 +00:00
|
|
|
echo " Please make sure to initialize this environment variable to "
|
|
|
|
echo " the directory where you have installed the Breeder_1.5 section "
|
|
|
|
echo " of the openfoam-extend Subversion repository"
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# We need $WM_PROJECT_DIR
|
|
|
|
if [ -z "$WM_PROJECT_DIR" ]
|
|
|
|
then
|
|
|
|
echo "Warning:"
|
2013-07-18 01:02:34 +00:00
|
|
|
echo " Missing environment variable \$WM_PROJECT_DIR. Stopping."
|
2010-10-07 03:00:07 +00:00
|
|
|
echo " Please make sure your OpenFOAM environment is properly set up."
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# We need $
|
|
|
|
if [ ! -e $BREEDER_OSIG_TURBOMACHINERY_DIR/CMakeLists.txt ]
|
|
|
|
then
|
|
|
|
echo "Warning:"
|
2013-07-18 01:02:34 +00:00
|
|
|
echo " Missing file: CMakeLists.txt under \$BREEDER_15_DIR/OSIG/TurboMachinery. Stopping."
|
|
|
|
echo " A copy of CMakeLists.txt is available under $FOAM_TEST_HARNESS_DIR/CMakeFiles."
|
2010-10-07 03:00:07 +00:00
|
|
|
echo " Please make a copy of this file under the directory \$BREEDER_15_DIR/OSIG/TurboMachinery."
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# We also need $BREEDER_OSIG_TURBOMACHINERY_DIR/CTestConfig.cmake
|
|
|
|
if [ ! -e $BREEDER_OSIG_TURBOMACHINERY_DIR/CTestConfig.cmake ]
|
|
|
|
then
|
|
|
|
echo "Warning:"
|
2013-07-18 01:02:34 +00:00
|
|
|
echo " Missing file: CTestConfig.cmake under \$BREEDER_OSIG_TURBOMACHINERY_DIR. Stopping."
|
|
|
|
echo " A copy of CTestConfig.cmake for openfoam-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."
|
2010-10-07 03:00:07 +00:00
|
|
|
echo " Please make a copy of this file under \$BREEDER_OSIG_TURBOMACHINERY_DIR/CTestConfig.cmake."
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Make sure the CMake and tutorials runtime files are updated
|
|
|
|
# We need cmake version 2.8.0 at least
|
|
|
|
cmake $BREEDER_OSIG_TURBOMACHINERY_DIR
|
|
|
|
|
|
|
|
# All set. Now we can run the available test harness
|
|
|
|
#
|
|
|
|
# Invoke make help for the complete list of available commands.
|
|
|
|
#
|
|
|
|
# User-demand testing.
|
|
|
|
# Will do: ExperimentalConfigure + ExperimentalBuild + ExperimentalTest + ExperimentalSubmit
|
|
|
|
# make Experimental
|
|
|
|
|
2013-07-18 01:02:34 +00:00
|
|
|
# Nightly testing
|
2010-10-07 03:00:07 +00:00
|
|
|
# Will do: NightlyUpdate + NightylConfigure + NightlyBuild + NightlyTest + NightlySubmit
|
|
|
|
make Nightly
|
|
|
|
|
|
|
|
# That's it
|