/[escript]/trunk/mk
ViewVC logotype

Annotation of /trunk/mk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 164 - (hide annotations)
Fri Nov 11 00:45:35 2005 UTC (17 years, 4 months ago) by jgs
File size: 5480 byte(s)
a test commit to svn of mk

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26