3 |
# $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $ |
# $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $ |
4 |
# An explicit testing script for esys using the scons build system |
# An explicit testing script for esys using the scons build system |
5 |
|
|
|
|
|
6 |
# list of users to email test results to |
# 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" |
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 |
|
|
14 |
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" |
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" |
15 |
BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py" |
BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py" |
16 |
|
|
17 |
|
PWD=`pwd` |
18 |
|
echo working in: $PWD |
19 |
|
|
20 |
# define compiler executable and library locations |
# define compiler executable and library locations |
21 |
export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH |
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 |
export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib |
23 |
|
|
24 |
|
# define python location |
25 |
|
export PATH=/raid2/tools/python-2.3.4/bin:$PATH |
26 |
|
|
27 |
|
# set library and openmp settings |
28 |
|
export LD_LIBRARY_PATH=$PWD/lib:/raid2/tools/boost/lib:$LD_LIBRARY_PATH |
29 |
|
export PYTHONPATH=$PWD |
30 |
|
export OMP_SCHEDULE="dynamic" |
31 |
|
export OMP_NUM_THREADS=4 |
32 |
|
export OMP_DYNAMIC=TRUE |
33 |
|
export OMP_NESTED=FALSE |
34 |
|
|
35 |
|
FAIL=0 |
36 |
|
|
37 |
echo cd $1 |
echo cd $1 |
38 |
cd $1 |
cd $1 |
39 |
if [ $? != 0 ] |
if [ $? != 0 ] |
43 |
exit 1 |
exit 1 |
44 |
fi |
fi |
45 |
|
|
|
echo loading esys setup |
|
|
. ~jgs/bin/scons_setup |
|
|
if [ $? != 0 ] |
|
|
then |
|
|
echo couldnt load scons setup |
|
|
echo "couldnt load scons setup" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
|
|
exit 2 |
|
|
fi |
|
|
|
|
46 |
echo running svn update |
echo running svn update |
47 |
svn update |
svn update |
48 |
if [ $? != 0 ] |
if [ $? != 0 ] |
49 |
then |
then |
50 |
echo svn update failed |
echo svn update failed |
51 |
echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
52 |
exit 3 |
exit 2 |
53 |
fi |
fi |
54 |
|
|
55 |
echo running scons debug=1 |
echo running scons debug=1 |
58 |
then |
then |
59 |
echo scons failed |
echo scons failed |
60 |
echo "scons failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "scons failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
61 |
exit 5 |
exit 3 |
62 |
fi |
fi |
63 |
|
|
64 |
echo running bruce unit_tests |
echo running bruce unit_tests |
68 |
then |
then |
69 |
echo bruce unit_test failed |
echo bruce unit_test failed |
70 |
echo "bruce unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "bruce unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
71 |
#exit 6 |
FAIL=1 |
72 |
fi |
fi |
73 |
cd ../.. |
cd ../.. |
74 |
|
|
79 |
then |
then |
80 |
echo escript unit_test failed |
echo escript unit_test failed |
81 |
echo "escript unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "escript unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
82 |
#exit 6 |
FAIL=1 |
83 |
fi |
fi |
84 |
cd ../.. |
cd ../.. |
85 |
|
|
90 |
then |
then |
91 |
echo finley unit_test failed |
echo finley unit_test failed |
92 |
echo "finley unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "finley unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
93 |
#exit 6 |
FAIL=1 |
94 |
fi |
fi |
95 |
cd ../.. |
cd ../.. |
96 |
|
|
101 |
then |
then |
102 |
echo esysUtils unit_test failed |
echo esysUtils unit_test failed |
103 |
echo "esysUtils unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "esysUtils unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
104 |
#exit 6 |
FAIL=1 |
105 |
fi |
fi |
106 |
cd ../.. |
cd ../.. |
107 |
|
|
|
export LD_LIBRARY_PATH=/raid2/tools/python-2.3.4/lib:$LD_LIBRARY_PATH |
|
|
export PYTHON_INCLUDE=/raid2/tools/python-2.3.4/include/python2.3 |
|
|
export PYTHON_LIB_PATH=/raid2/tools/python-2.3.4/lib |
|
|
export PATH=/raid2/tools/python-2.3.4/bin:$PATH |
|
|
|
|
108 |
for module in $TESTS |
for module in $TESTS |
109 |
do |
do |
110 |
echo "running python tests for: $module" |
echo "running python tests for: $module" |
118 |
if [ $? != 0 ] |
if [ $? != 0 ] |
119 |
then |
then |
120 |
echo Python Testing FAILED for $pytest in module $module |
echo Python Testing FAILED for $pytest in module $module |
121 |
echo "finley py_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "finley py_test: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
122 |
#exit 1 |
FAIL=1 |
123 |
fi |
fi |
124 |
done |
done |
125 |
elif [ "$module" == "escript" ] |
elif [ "$module" == "escript" ] |
131 |
if [ $? != 0 ] |
if [ $? != 0 ] |
132 |
then |
then |
133 |
echo Python Testing FAILED for $pytest in module $module |
echo Python Testing FAILED for $pytest in module $module |
134 |
echo "escript py_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "escript py_test: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
135 |
#exit 1 |
FAIL=1 |
136 |
fi |
fi |
137 |
done |
done |
138 |
elif [ "$module" == "bruce" ] |
elif [ "$module" == "bruce" ] |
144 |
if [ $? != 0 ] |
if [ $? != 0 ] |
145 |
then |
then |
146 |
echo Python Testing FAILED for $pytest in module $module |
echo Python Testing FAILED for $pytest in module $module |
147 |
echo "bruce py_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "bruce py_test: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
148 |
#exit 1 |
FAIL=1 |
149 |
fi |
fi |
150 |
done |
done |
151 |
fi |
fi |
152 |
cd ../../.. |
cd ../../.. |
153 |
done |
done |
154 |
|
|
155 |
echo success |
if [ $FAIL == 0 ] |
156 |
echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
then |
157 |
|
echo success |
158 |
|
echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
159 |
|
fi |
160 |
exit 0 |
exit 0 |