/[escript]/branches/cookbookdev/autotest-scons
ViewVC logotype

Annotation of /branches/cookbookdev/autotest-scons

Parent Directory Parent Directory | Revision Log Revision Log


Revision 336 - (hide annotations)
Thu Dec 8 23:34:44 2005 UTC (13 years, 5 months ago) by svn
Original Path: trunk/autotest-scons
File size: 4727 byte(s)
add esysUtils unit tests
1 jgs 318 #!/bin/bash
2    
3 svn 336 # $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $
4 jgs 318 # An explicit testing script for esys using the scons build system
5    
6 svn 336
7 jgs 318 # list of users to email test results to
8 svn 331 MAIL_RECIPIENTS="jgs@esscc.uq.edu.au gross@esscc.uq.edu.au cochrane@esscc.uq.edu.au elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au"
9 jgs 318
10 svn 336 # modules to test
11 jgs 321 TESTS="escript bruce finley"
12    
13     # the python tests to run
14     FINLEY_PYTESTS="ImportTest.py SimpleSolve.py GradTest.py test_linearPDEsOnFinley.py test_generators.py test_visualization_interface.py test_utilOnFinley.py test_symbolsOnFinley.py"
15 svn 330 #ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py DataVariableTests.py test_xml.py"
16     ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py DataVariableTests.py"
17 jgs 321 BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py"
18    
19    
20 jgs 318 # define compiler executable and library locations
21     export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH
22     export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib
23    
24     echo cd $1
25     cd $1
26     if [ $? != 0 ]
27     then
28     echo couldnt cd $1
29 svn 336 echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
30 jgs 318 exit 1
31     fi
32    
33     echo loading esys setup
34     . ~jgs/bin/scons_setup
35     if [ $? != 0 ]
36     then
37     echo couldnt load scons setup
38 svn 336 echo "couldnt load scons setup" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
39 jgs 318 exit 2
40     fi
41    
42 svn 320 echo running svn update
43     svn update
44     if [ $? != 0 ]
45     then
46     echo svn update failed
47 svn 336 echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
48 svn 320 exit 3
49     fi
50 jgs 319
51 svn 320 echo running scons debug=1
52     scons debug=1
53     if [ $? != 0 ]
54     then
55     echo scons failed
56 svn 336 echo "scons failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
57 svn 320 exit 5
58     fi
59    
60 jgs 319 echo running bruce unit_tests
61     cd bruce/test
62 svn 320 ./unit_test-scons
63 jgs 318 if [ $? != 0 ]
64     then
65 jgs 319 echo bruce unit_test failed
66 svn 336 echo "bruce unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
67 jgs 319 exit 6
68 jgs 318 fi
69 svn 320 cd ../..
70 jgs 318
71 jgs 319 echo running escript unit_tests
72     cd escript/test
73 svn 320 ./unit_test-scons
74 jgs 318 if [ $? != 0 ]
75     then
76 jgs 319 echo escript unit_test failed
77 svn 336 echo "escript unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
78 jgs 319 exit 6
79 jgs 318 fi
80 svn 320 cd ../..
81 jgs 318
82 jgs 319 echo running finley unit_tests
83     cd finley/test
84 svn 320 ./unit_test-scons
85 jgs 319 if [ $? != 0 ]
86     then
87     echo finley unit_test failed
88 svn 336 echo "finley unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
89 jgs 319 exit 6
90     fi
91 svn 320 cd ../..
92 jgs 318
93 svn 336 echo running esysUtils unit_tests
94     cd esysUtils/test
95     ./unit_test-scons
96     if [ $? != 0 ]
97     then
98     echo esysUtils unit_test failed
99     echo "esysUtils unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
100     exit 6
101     fi
102     cd ../..
103    
104 svn 330 export LD_LIBRARY_PATH=/raid2/tools/python-2.3.4/lib:$LD_LIBRARY_PATH
105     export PYTHON_INCLUDE=/raid2/tools/python-2.3.4/include/python2.3
106     export PYTHON_LIB_PATH=/raid2/tools/python-2.3.4/lib
107     export PATH=/raid2/tools/python-2.3.4/bin:$PATH
108    
109 jgs 321 for module in $TESTS
110     do
111     echo "running python tests for: $module"
112     cd $module/test/python
113     if [ "$module" == "finley" ]
114     then
115     for pytest in $FINLEY_PYTESTS
116     do
117     echo "Running python test: $pytest"
118     python $pytest
119     if [ $? != 0 ]
120     then
121     echo Python Testing FAILED for $pytest in module $module
122 svn 336 echo "finley py_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
123 jgs 321 exit 1
124     fi
125     done
126     elif [ "$module" == "escript" ]
127     then
128     for pytest in $ESCRIPT_PYTESTS
129     do
130     echo "Running python test: $pytest"
131     python $pytest
132     if [ $? != 0 ]
133     then
134     echo Python Testing FAILED for $pytest in module $module
135 svn 336 echo "escript py_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
136 jgs 321 exit 1
137     fi
138     done
139     elif [ "$module" == "bruce" ]
140     then
141     for pytest in $BRUCE_PYTESTS
142     do
143     echo "Running python test: $pytest"
144     python $pytest
145     if [ $? != 0 ]
146     then
147     echo Python Testing FAILED for $pytest in module $module
148 svn 336 echo "bruce py_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
149 jgs 321 exit 1
150     fi
151     done
152     fi
153 svn 330 cd ../../..
154 jgs 321 done
155 jgs 318
156 svn 336 echo success
157     echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
158 jgs 318 exit 0

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26