/[escript]/trunk/autotest-scons
ViewVC logotype

Contents of /trunk/autotest-scons

Parent Directory Parent Directory | Revision Log Revision Log


Revision 321 - (show annotations)
Tue Dec 6 04:46:50 2005 UTC (13 years, 8 months ago) by jgs
File size: 3634 byte(s)
rough python test running code added
1 #!/bin/bash
2
3 # $Id: autotest 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 SimpleSolve.py GradTest.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 newEscriptTests.py DataVariableTests.py test_xml.py"
16 BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py"
17
18
19 # define compiler executable and library locations
20 export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH
21 export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib
22
23 echo cd $1
24 cd $1
25 if [ $? != 0 ]
26 then
27 echo couldnt cd $1
28 echo "couldnt cd $1" | mail -s "esys autotest results" $MAIL_RECIPIENTS
29 exit 1
30 fi
31
32 echo loading esys setup
33 . ~jgs/bin/scons_setup
34 if [ $? != 0 ]
35 then
36 echo couldnt load scons setup
37 echo "couldnt load scons setup" | mail -s "esys autotest results" $MAIL_RECIPIENTS
38 exit 2
39 fi
40
41 echo running svn update
42 svn update
43 if [ $? != 0 ]
44 then
45 echo svn update failed
46 echo "svn update failed" | mail -s "esys autotest results" $MAIL_RECIPIENTS
47 exit 3
48 fi
49
50 echo running scons debug=1
51 scons debug=1
52 if [ $? != 0 ]
53 then
54 echo scons failed
55 echo "scons failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS
56 exit 5
57 fi
58
59 echo running bruce unit_tests
60 cd bruce/test
61 ./unit_test-scons
62 if [ $? != 0 ]
63 then
64 echo bruce unit_test failed
65 echo "bruce unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS
66 exit 6
67 fi
68 cd ../..
69
70 echo running escript unit_tests
71 cd escript/test
72 ./unit_test-scons
73 if [ $? != 0 ]
74 then
75 echo escript unit_test failed
76 echo "escript unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS
77 exit 6
78 fi
79 cd ../..
80
81 echo running finley unit_tests
82 cd finley/test
83 ./unit_test-scons
84 if [ $? != 0 ]
85 then
86 echo finley unit_test failed
87 echo "finley unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS
88 exit 6
89 fi
90 cd ../..
91
92 for module in $TESTS
93 do
94 echo "running python tests for: $module"
95 cd $module/test/python
96 if [ "$module" == "finley" ]
97 then
98 for pytest in $FINLEY_PYTESTS
99 do
100 echo "Running python test: $pytest"
101 python $pytest
102 if [ $? != 0 ]
103 then
104 echo Python Testing FAILED for $pytest in module $module
105 exit 1
106 fi
107 done
108 elif [ "$module" == "escript" ]
109 then
110 for pytest in $ESCRIPT_PYTESTS
111 do
112 echo "Running python test: $pytest"
113 python $pytest
114 if [ $? != 0 ]
115 then
116 echo Python Testing FAILED for $pytest in module $module
117 exit 1
118 fi
119 done
120 elif [ "$module" == "bruce" ]
121 then
122 for pytest in $BRUCE_PYTESTS
123 do
124 echo "Running python test: $pytest"
125 python $pytest
126 if [ $? != 0 ]
127 then
128 echo Python Testing FAILED for $pytest in module $module
129 exit 1
130 fi
131 done
132 fi
133 cd ../..
134 done
135
136 echo "success" | mail -s "esys autotest results" $MAIL_RECIPIENTS
137 exit 0

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26