Install Hydro-Quebec Tools in test loop
[foam-extend-3.2.git] / testHarness / OpenFOAM / 1.6-ext / runDir / Allrun_Nightly
blob64011568ca740afaafc2645f3735134389fae594
1 #!/bin/bash
2 # /*-------------------------------------------------------------------------*\
3 # ========= |
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 # \\ / O peration |
6 # \\ / A nd | Copyright held by original author
7 # \\/ M anipulation |
8 # -----------------------------------------------------------------------------
9 # License
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software; you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation; either version 2 of the License, or (at your
15 # option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 # for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM; if not, write to the Free Software Foundation,
24 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 # Description
27 # Allrun file for running the OpenFOAM test harness
29 # Author
30 # Martin Beaudoin, Hydro-Quebec, 2010. All rights reserved
33 # \*-------------------------------------------------------------------------*/
35 #set -x
37 # This environment variable must point to the location of the test harness
38 # main directory
39 export FOAM_TEST_HARNESS_DIR=$(dirname $PWD)
41 # First, some sanity checks
44 # We need $WM_PROJECT_DIR
45 if [ -z "$WM_PROJECT_DIR" ]
46 then
47 echo "Warning:"
48 echo " Missing environment variable \$WM_PROJECT_DIR. Stopping."
49 echo " Please make sure your OpenFOAM environment is properly set up."
50 exit -1
53 # We need $WM_PROJECT_DIR/CMakeLists.txt
54 if [ ! -e $WM_PROJECT_DIR/CMakeLists.txt ]
55 then
56 echo "Warning:"
57 echo " Missing file: CMakeLists.txt under \$WM_PROJECT_DIR. Stopping."
58 echo " A copy of CMakeLists.txt is available under $FOAM_TEST_HARNESS_DIR/CMakeFiles."
59 echo " Please make a copy of this file under your OpenFOAM installation directory \$WM_PROJECT_DIR."
60 exit -1
63 # We also need $WM_PROJECT_DIR/CTestConfig.cmake
64 if [ ! -e $WM_PROJECT_DIR/CTestConfig.cmake ]
65 then
66 echo "Warning:"
67 echo " Missing file: CTestConfig.cmake under \$WM_PROJECT_DIR. Stopping."
68 echo " A copy of CTestConfig.cmake for openfoam-extend is available under $FOAM_TEST_HARNESS_DIR/CMakeFiles."
69 echo " For a copy of CTestConfig.cmake for your local CDash server, contact your local CDash admin."
70 echo " Please make a copy of this file under \$WM_PROJECT_DIR/CTestConfig.cmake."
71 exit -1
74 # Install Hydro-Quebec Tools if necessary
75 command -v pyFoamChangeMixingPlaneBoundary.py >/dev/null
76 if [ $? -ne 0 ];
77 then
78 ${WM_THIRD_PARTY_DIR}/AllMake.stage6
81 # Make sure the CMake and tutorials runtime files are updated
82 # We need cmake version 2.8.0 at least
83 cmake $WM_PROJECT_DIR
85 # All set. Now we can run the available test harness
87 # Invoke make help for the complete list of available commands.
89 # User-demand testing.
90 # Will do: ExperimentalConfigure + ExperimentalBuild + ExperimentalTest + ExperimentalSubmit
91 # make Experimental
93 # Nightly testing
94 # Will do: NightlyUpdate + NightylConfigure + NightlyBuild + NightlyTest + NightlySubmit
95 make Nightly
97 # That's it