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

Contents of /branches/windows_from_1431_trunk/autotest-scons

Parent Directory Parent Directory | Revision Log Revision Log


Revision 356 - (show annotations)
Wed Dec 14 05:37:24 2005 UTC (13 years, 4 months ago) by jgs
Original Path: trunk/autotest-scons
File size: 4671 byte(s)
add scons line to build unit-tests

1 #!/bin/bash
2
3 # $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $
4 # An explicit testing script for esys using the scons build system
5
6 # list of users to email test results to
7 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"
8 #MAIL_RECIPIENTS="jgs@esscc.uq.edu.au"
9
10 # modules to test
11 TESTS="escript bruce finley"
12
13 # the python tests to run
14 FINLEY_PYTESTS="ImportTest.py finleyTest.py SimpleSolve.py GradTest.py RecTest.py test_linearPDEsOnFinley.py test_generators.py test_visualization_interface.py test_utilOnFinley.py test_symbolsOnFinley.py"
15 ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py ArchiveTests.py escriptTest.py newEscriptTests.py DataVariableTests.py test_xml.py"
16 BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py"
17
18 echo cd $1
19 cd $1
20 if [ $? != 0 ]
21 then
22 echo couldnt cd $1
23 echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
24 exit 1
25 fi
26
27 PWD=`pwd`
28 echo working in: $PWD
29
30 # define compiler executable and library locations
31 export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH
32 export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib
33
34 # define python location
35 export PATH=/raid2/tools/python-2.3.4/bin:$PATH
36
37 # set library and openmp settings
38 export LD_LIBRARY_PATH=$PWD/lib:/raid2/tools/boost/lib:$LD_LIBRARY_PATH
39 export PYTHONPATH=$PWD
40 export OMP_SCHEDULE="dynamic"
41 export OMP_NUM_THREADS=4
42 export OMP_DYNAMIC=TRUE
43 export OMP_NESTED=FALSE
44
45 FAIL=0
46
47 echo running svn update
48 svn update
49 if [ $? != 0 ]
50 then
51 echo svn update failed
52 echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
53 exit 2
54 fi
55
56 echo running scons debug=1
57 scons debug=1
58 scons debug=1 build_tests
59 if [ $? != 0 ]
60 then
61 echo scons failed
62 echo "scons failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
63 exit 3
64 fi
65
66 echo running bruce unit_tests
67 cd bruce/test
68 ./unit_test-scons
69 if [ $? != 0 ]
70 then
71 echo bruce unit_test failed
72 echo "bruce unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
73 FAIL=1
74 fi
75 cd ../..
76
77 echo running escript unit_tests
78 cd escript/test
79 ./unit_test-scons
80 if [ $? != 0 ]
81 then
82 echo escript unit_test failed
83 echo "escript unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
84 FAIL=1
85 fi
86 cd ../..
87
88 echo running finley unit_tests
89 cd finley/test
90 ./unit_test-scons
91 if [ $? != 0 ]
92 then
93 echo finley unit_test failed
94 echo "finley unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
95 FAIL=1
96 fi
97 cd ../..
98
99 echo running esysUtils unit_tests
100 cd esysUtils/test
101 ./unit_test-scons
102 if [ $? != 0 ]
103 then
104 echo esysUtils unit_test failed
105 echo "esysUtils unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
106 FAIL=1
107 fi
108 cd ../..
109
110 for module in $TESTS
111 do
112 echo "running python tests for: $module"
113 cd $module/test/python
114 if [ "$module" == "finley" ]
115 then
116 for pytest in $FINLEY_PYTESTS
117 do
118 echo "Running python test: $pytest"
119 python $pytest
120 if [ $? != 0 ]
121 then
122 echo Python Testing FAILED for $pytest in module $module
123 echo "finley py_test: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
124 FAIL=1
125 fi
126 done
127 elif [ "$module" == "escript" ]
128 then
129 for pytest in $ESCRIPT_PYTESTS
130 do
131 echo "Running python test: $pytest"
132 python $pytest
133 if [ $? != 0 ]
134 then
135 echo Python Testing FAILED for $pytest in module $module
136 echo "escript py_test: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
137 FAIL=1
138 fi
139 done
140 elif [ "$module" == "bruce" ]
141 then
142 for pytest in $BRUCE_PYTESTS
143 do
144 echo "Running python test: $pytest"
145 python $pytest
146 if [ $? != 0 ]
147 then
148 echo Python Testing FAILED for $pytest in module $module
149 echo "bruce py_test: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
150 FAIL=1
151 fi
152 done
153 fi
154 cd ../../..
155 done
156
157 if [ $FAIL == 0 ]
158 then
159 echo success
160 echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
161 fi
162 exit 0

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26