/[escript]/trunk/mk
ViewVC logotype

Annotation of /trunk/mk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 149 - (hide annotations)
Thu Sep 1 03:31:39 2005 UTC (14 years, 3 months ago) by jgs
Original Path: trunk/esys2/mk
File size: 5243 byte(s)
Merge of development branch dev-02 back to main trunk on 2005-09-01

1 jgs 116 #!/bin/bash
2    
3 jgs 82 # $Id$
4 jgs 116 # An explicit building script for esys
5 jgs 82
6 jgs 122 #**********************************************************************
7     # NB: this script is setup to perform default developmental builds
8     # change any settings you require, but PLEASE do not check any changes
9     # to this script back into the repository - talk to Jon first
10     #**********************************************************************
11    
12     # the modules to make
13 jgs 149 MODULES="tools/CppUnitTest tools/mmio esysUtils escript finley bruce modellib"
14 jgs 82
15 jgs 149 # the modules to test
16     TESTS="escript finley bruce"
17 jgs 122
18 jgs 149 # the python tests to run
19     FINLEY_PYTESTS="ImportTest.py SimpleSolve.py GradTest.py test_linearPDEsOnFinley.py"
20     ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py escriptTest.py DataVariableTests.py test_xml.py pdetoolsTest.py"
21     BRUCE_PYTESTS="ImportTest.py"
22    
23 jgs 122 # use this setting for local developmental builds
24 jgs 149 ENVVARS="DODEBUG=YES"
25 jgs 120
26 jgs 147 if [ "$2" == "DEBUG" ]
27 jgs 125 then
28     ENVVARS="DODEBUG=YES"
29     fi
30    
31 jgs 147 if [ "$2" == "NODEBUG" ]
32 jgs 123 then
33     ENVVARS="DODEBUG=NO"
34     fi
35    
36 jgs 122 # use this setting for production installs on altix
37     # ** NB: overwrites centrally installed esys libraries on altix ***
38 jgs 147 #ENVVARS="$ENVVARS L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"
39 jgs 120
40 jgs 122 # ensure required symlinks are setup first
41 jgs 149 (cd esysUtils/inc; if [ ! -h esysUtils ]; then ln -s ../src esysUtils; fi)
42 jgs 122 (cd escript/inc; if [ ! -h escript ]; then ln -s ../src escript; fi)
43     (cd finley/inc; if [ ! -h finley ]; then ln -s ../src finley; fi)
44 jgs 149 (cd bruce/inc; if [ ! -h bruce ]; then ln -s ../src bruce; fi)
45 jgs 122
46 jgs 149 (cd tools/mmio; if [ ! -h Makefile ]; then ln -s ./mmio.mk Makefile; fi)
47     (cd tools/CppUnitTest; if [ ! -h Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)
48     (cd esysUtils; if [ ! -h Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)
49 jgs 122 (cd escript; if [ ! -h Makefile ]; then ln -s ./escript.mk Makefile; fi)
50     (cd finley; if [ ! -h Makefile ]; then ln -s ./finley.mk Makefile; fi)
51 jgs 149 (cd bruce; if [ ! -h Makefile ]; then ln -s ./bruce.mk Makefile; fi)
52 jgs 136 (cd modellib; if [ ! -h Makefile ]; then ln -s ./modellib.mk Makefile; fi)
53 jgs 122
54     # clean all modules
55 jgs 147 if [ "$1" == "clean" ]
56 jgs 116 then
57 jgs 147 for module in $MODULES ; do
58     (echo Cleaning: $module; cd $module; make clean)
59 jgs 116 done
60 jgs 147 exit 0
61 jgs 116 fi
62    
63 jgs 122 # uninstall all modules
64 jgs 147 if [ "$1" == "uninstall" ]
65 jgs 122 then
66 jgs 147 for module in $MODULES ; do
67 jgs 149 (echo Cleaning: $module; cd $module; make clean)
68 jgs 122 done
69 jgs 149 for module in $MODULES ; do
70     (echo Uninstalling: $module; cd $module; make uninstall)
71     done
72 jgs 147 exit 0
73 jgs 122 fi
74 jgs 82
75 jgs 122 # run the unit tests
76     if [ "$1" == "unit_test" ]
77     then
78     for module in $TESTS
79     do
80     echo "Running unit tests for: $module"
81     cd $ESYS_ROOT/$module/test
82 jgs 147 ./unit_test
83     if [ $? != 0 ]
84     then
85     echo Unit Testing FAILED for module: $module
86     exit 1
87     fi
88 jgs 122 done
89 jgs 147 exit 0
90 jgs 122 fi
91    
92     # run the python tests
93     if [ "$1" == "py_test" ]
94     then
95     for module in $TESTS
96     do
97     echo "Running python tests for: $module"
98 jgs 149 cd $ESYS_ROOT/$module/test/python
99 jgs 122 if [ "$module" == "finley" ]
100     then
101 jgs 149 for pytest in $FINLEY_PYTESTS
102     do
103     echo "Running python test: $pytest"
104     python $pytest
105     if [ $? != 0 ]
106     then
107     echo Python Testing FAILED for $pytest in module $module
108     exit 1
109     fi
110     done
111 jgs 122 elif [ "$module" == "escript" ]
112     then
113 jgs 149 for pytest in $ESCRIPT_PYTESTS
114     do
115     echo "Running python test: $pytest"
116     python $pytest
117     if [ $? != 0 ]
118     then
119     echo Python Testing FAILED for $pytest in module $module
120     exit 1
121     fi
122     done
123     elif [ "$module" == "bruce" ]
124     then
125     for pytest in $BRUCE_PYTESTS
126     do
127     echo "Running python test: $pytest"
128     python $pytest
129     if [ $? != 0 ]
130     then
131     echo Python Testing FAILED for $pytest in module $module
132     exit 1
133     fi
134     done
135 jgs 122 fi
136     done
137 jgs 147 exit 0
138 jgs 122 fi
139 jgs 147
140     # default case - just build all modules
141 jgs 149 echo "*************** build ************************************"
142 jgs 147 for module in $MODULES ; do
143     (echo Building: $module; cd $module; env $ENVVARS make -j 10)
144     if [ $? != 0 ]
145     then
146     echo Build FAILED for module: $module
147     exit 1
148     fi
149     done
150    
151     # install all modules
152     if [ "$1" == "install" ]
153     then
154 jgs 149 echo "***************installation ************************************"
155 jgs 147 for module in $MODULES ; do \
156 jgs 149 echo ENVVARS = $ENVVARS
157 jgs 147 (echo Installing: $module; cd $module; env $ENVVARS make install)
158     if [ $? != 0 ]
159     then
160     echo Installation FAILED for module: $module
161     exit 1
162     fi
163     done
164 jgs 149 (cd esys; touch __init__.py)
165 jgs 147 (cd esys/escript; if [ ! -h escriptcpp.so ]; then ln -s ../../lib/libescriptcpp.so escriptcpp.so; fi)
166     (cd esys/finley; if [ ! -h finleycpp.so ]; then ln -s ../../lib/libfinleycpp.so finleycpp.so; fi)
167 jgs 149 (cd esys/bruce; if [ ! -h brucecpp.so ]; then ln -s ../../lib/libbrucecpp.so brucecpp.so; fi)
168 jgs 147 exit 0
169     fi

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26