/[escript]/tags/stable-2005-11-09/mk
ViewVC logotype

Annotation of /tags/stable-2005-11-09/mk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 147 - (hide annotations)
Fri Aug 12 01:45:47 2005 UTC (14 years, 3 months ago) by jgs
Original Path: trunk/esys2/mk
File size: 5845 byte(s)
erge of development branch dev-02 back to main trunk on 2005-08-12

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 147 MODULES="tools/CppUnitTest tools/mmio esysUtils escript finley modellib"
14 jgs 82
15 jgs 122 # the tests to run
16     TESTS="escript finley"
17    
18     # use this setting for local developmental builds
19 jgs 125 #ENVVARS="DODEBUG=YES"
20 jgs 120
21 jgs 147 if [ "$2" == "DEBUG" ]
22 jgs 125 then
23     ENVVARS="DODEBUG=YES"
24     fi
25    
26 jgs 147 if [ "$2" == "NODEBUG" ]
27 jgs 123 then
28     ENVVARS="DODEBUG=NO"
29     fi
30    
31 jgs 122 # use this setting for production installs on altix
32     # ** NB: overwrites centrally installed esys libraries on altix ***
33 jgs 147 #ENVVARS="$ENVVARS L_INSTLIB_DIR=/raid2/tools/esys/lib L_PYTH_DIR=/raid2/tools/esys/esys"
34 jgs 120
35 jgs 122 # ensure required symlinks are setup first
36     (cd escript/inc; if [ ! -h escript ]; then ln -s ../src escript; fi)
37     (cd esysUtils/inc; if [ ! -h esysUtils ]; then ln -s ../src esysUtils; fi)
38     (cd finley/inc; if [ ! -h finley ]; then ln -s ../src finley; fi)
39    
40     (cd escript; if [ ! -h Makefile ]; then ln -s ./escript.mk Makefile; fi)
41     (cd esysUtils; if [ ! -h Makefile ]; then ln -s ./esysUtils.mk Makefile; fi)
42     (cd finley; if [ ! -h Makefile ]; then ln -s ./finley.mk Makefile; fi)
43     (cd tools/mmio; if [ ! -h Makefile ]; then ln -s ./mmio.mk Makefile; fi)
44     (cd tools/CppUnitTest; if [ ! -h Makefile ]; then ln -s ./CppUnitTest.mk Makefile; fi)
45 jgs 136 (cd modellib; if [ ! -h Makefile ]; then ln -s ./modellib.mk Makefile; fi)
46 jgs 122
47     # clean all modules
48 jgs 147 if [ "$1" == "clean" ]
49 jgs 116 then
50 jgs 147 for module in $MODULES ; do
51     (echo Cleaning: $module; cd $module; make clean)
52 jgs 116 done
53 jgs 147 exit 0
54 jgs 116 fi
55    
56 jgs 122 # uninstall all modules
57 jgs 147 if [ "$1" == "uninstall" ]
58 jgs 122 then
59 jgs 147 for module in $MODULES ; do
60     (echo Uninstalling: $module; cd $module; gmake uninstall)
61 jgs 122 done
62 jgs 147 exit 0
63 jgs 122 fi
64 jgs 82
65 jgs 122 # run the unit tests
66     if [ "$1" == "unit_test" ]
67     then
68     for module in $TESTS
69     do
70     echo "Running unit tests for: $module"
71     cd $ESYS_ROOT/$module/test
72 jgs 147 ./unit_test
73     if [ $? != 0 ]
74     then
75     echo Unit Testing FAILED for module: $module
76     exit 1
77     fi
78 jgs 122 done
79 jgs 147 exit 0
80 jgs 122 fi
81    
82     # run the python tests
83     if [ "$1" == "py_test" ]
84     then
85     for module in $TESTS
86     do
87     echo "Running python tests for: $module"
88     if [ "$module" == "finley" ]
89     then
90     cd $ESYS_ROOT/$module/test/python
91     python ImportTest.py
92 jgs 147 if [ $? != 0 ]
93     then
94     echo Python Testing FAILED for module: $module
95     exit 1
96     fi
97 jgs 122 python SimpleSolve.py
98 jgs 147 if [ $? != 0 ]
99     then
100     echo Python Testing FAILED for module: $module
101     exit 1
102     fi
103 jgs 122 python GradTest.py
104 jgs 147 if [ $? != 0 ]
105     then
106     echo Python Testing FAILED for module: $module
107     exit 1
108     fi
109 jgs 122 elif [ "$module" == "escript" ]
110     then
111     cd $ESYS_ROOT/$module/test/python
112     python ImportTest.py
113 jgs 147 if [ $? != 0 ]
114     then
115     echo Python Testing FAILED for module: $module
116     exit 1
117     fi
118 jgs 122 python BinaryOps.py
119 jgs 147 if [ $? != 0 ]
120     then
121     echo Python Testing FAILED for module: $module
122     exit 1
123     fi
124 jgs 122 python UnaryOps.py
125 jgs 147 if [ $? != 0 ]
126     then
127     echo Python Testing FAILED for module: $module
128     exit 1
129     fi
130 jgs 122 python SliceGetting.py
131 jgs 147 if [ $? != 0 ]
132     then
133     echo Python Testing FAILED for module: $module
134     exit 1
135     fi
136 jgs 122 python SliceSetting.py
137 jgs 147 if [ $? != 0 ]
138     then
139     echo Python Testing FAILED for module: $module
140     exit 1
141     fi
142 jgs 122 python MiscTests.py
143 jgs 147 if [ $? != 0 ]
144     then
145     echo Python Testing FAILED for module: $module
146     exit 1
147     fi
148     python newEscriptTests.py
149     if [ $? != 0 ]
150     then
151     echo Python Testing FAILED for module: $module
152     exit 1
153     fi
154     python escriptTest.py
155     if [ $? != 0 ]
156     then
157     echo Python Testing FAILED for module: $module
158     exit 1
159     fi
160     python DataVariableTests.py
161     if [ $? != 0 ]
162     then
163     echo Python Testing FAILED for module: $module
164     exit 1
165     fi
166     python test_xml.py
167     if [ $? != 0 ]
168     then
169     echo Python Testing FAILED for module: $module
170     exit 1
171     fi
172     python pdetoolsTest.py
173     if [ $? != 0 ]
174     then
175     echo Python Testing FAILED for module: $module
176     exit 1
177     fi
178 jgs 122 fi
179     done
180 jgs 147 exit 0
181 jgs 122 fi
182 jgs 147
183     # default case - just build all modules
184     for module in $MODULES ; do
185     (echo Building: $module; cd $module; env $ENVVARS make -j 10)
186     if [ $? != 0 ]
187     then
188     echo Build FAILED for module: $module
189     exit 1
190     fi
191     done
192    
193     # install all modules
194     if [ "$1" == "install" ]
195     then
196     for module in $MODULES ; do \
197     echo ENVARS = $ENVVARS
198     (echo Installing: $module; cd $module; env $ENVVARS make install)
199     if [ $? != 0 ]
200     then
201     echo Installation FAILED for module: $module
202     exit 1
203     fi
204     done
205     (cd esys/escript; if [ ! -h escriptcpp.so ]; then ln -s ../../lib/libescriptcpp.so escriptcpp.so; fi)
206     (cd esys/finley; if [ ! -h finleycpp.so ]; then ln -s ../../lib/libfinleycpp.so finleycpp.so; fi)
207     exit 0
208     fi

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26