1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# Copyright 2006 by ACcESS MNRF |
3 |
|
# |
4 |
|
# http://www.access.edu.au |
5 |
|
# Primary Business: Queensland, Australia |
6 |
|
# Licensed under the Open Software License version 3.0 |
7 |
|
# http://www.opensource.org/licenses/osl-3.0.php |
8 |
|
# |
9 |
|
# |
10 |
|
# |
11 |
# $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $ |
# $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $ |
12 |
# An explicit testing script for esys using the scons build system |
# An explicit testing script for esys using the scons build system |
13 |
|
|
14 |
# list of users to email test results to |
# list of users to email test results to |
15 |
MAIL_RECIPIENTS="jgs@esscc.uq.edu.au gross@esscc.uq.edu.au elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au" |
MAIL_RECIPIENTS="gross@esscc.uq.edu.au elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au robert.woodcock@csiro.au Peter.Hornby@csiro.au" |
16 |
|
|
17 |
# the python tests to run |
# the python tests to run |
18 |
BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py" |
BRUCE_PYTESTS="ImportTest.passed BruceTest.passed test_utilOnBruce.py" |
19 |
ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py ArchiveTests.py newEscriptTests.py DataVariableTests.py test_xml.py insituTests.py pdetoolsTest.py s2.py" |
ESCRIPT_PYTESTS="ImportTest.passed BinaryOps.passed UnaryOps.passed SliceGetting.passed SliceSetting.passed MiscTests.passed ArchiveTests.passed newEscriptTests.passed test_xml.passed insituTests.passed s2.passed" |
20 |
FINLEY_PYTESTS="ImportTest.py finleyTest.py SimpleSolve.py RecTest.py test_linearPDEsOnFinley.py test_generators.py test_visualization_interface.py test_utilOnFinley.py test_symbolsOnFinley.py" |
FINLEY_PYTESTS="ImportTest.passed finleyTest.passed SimpleSolve.passed RecTest.passed test_linearPDEsOnFinley.passed test_generators.passed test_visualization_interface.passed test_utilOnFinley.passed" |
21 |
|
|
22 |
echo "===> cd $1" |
echo "===> cd $1" |
23 |
cd $1 |
cd $1 |
31 |
PWD=`pwd` |
PWD=`pwd` |
32 |
echo "===> working in: $PWD" |
echo "===> working in: $PWD" |
33 |
|
|
34 |
# define compiler executable and library locations |
# Setup the environment |
35 |
export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH |
. ${MODULESHOME}/init/sh |
36 |
export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib |
module load intel_cc.9.0.026 |
37 |
|
export MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6 |
38 |
# define python location |
module load python/2.4.1 |
39 |
export PATH=/raid2/tools/python-2.3.4/bin:$PATH |
module load boost/1.33.0/python-2.4.1 |
40 |
|
module load numarray/1.3.3 |
|
# set library and python paths |
|
|
export LD_LIBRARY_PATH=$PWD/lib:/raid2/tools/boost/lib:$LD_LIBRARY_PATH |
|
|
export PYTHONPATH=$PWD |
|
41 |
|
|
42 |
# set openmp settings |
# set openmp settings |
|
export OMP_SCHEDULE="dynamic" |
|
43 |
export OMP_NUM_THREADS=4 |
export OMP_NUM_THREADS=4 |
|
export OMP_DYNAMIC=TRUE |
|
|
export OMP_NESTED=FALSE |
|
44 |
|
|
45 |
echo "===> svn update" |
echo "===> svn update" |
46 |
svn update |
svn update |
61 |
fi |
fi |
62 |
|
|
63 |
echo "===> building unit_tests" |
echo "===> building unit_tests" |
64 |
scons build_tests |
scons build_all_tests |
65 |
if [ $? != 0 ] |
if [ $? != 0 ] |
66 |
then |
then |
67 |
echo "unit_test build failed" |
echo "build_tests failed" |
68 |
echo "unit_test build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "build_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
69 |
exit 3 |
exit 3 |
70 |
fi |
fi |
71 |
|
|
72 |
FAIL=0 |
FAIL=0 |
73 |
|
|
74 |
echo "===> running unit_tests" |
echo "===> running unit_tests" |
75 |
scons run_tests |
scons run_all_tests |
76 |
if [ $? != 0 ] |
if [ $? != 0 ] |
77 |
then |
then |
78 |
echo "unit_testing failed" |
echo "run_all_tests failed" |
79 |
echo "unit_test failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
echo "run_all_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
80 |
FAIL=1 |
exit 4 |
|
fi |
|
|
|
|
|
cd escript/test/python |
|
|
for pytest in $ESCRIPT_PYTESTS |
|
|
do |
|
|
echo "===>running escript python test: $pytest" |
|
|
python $pytest |
|
|
if [ $? != 0 ] |
|
|
then |
|
|
echo "python testing failed for $pytest in module $module" |
|
|
echo "escript py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
|
|
FAIL=1 |
|
|
fi |
|
|
done |
|
|
cd ../../.. |
|
|
|
|
|
cd finley/test/python |
|
|
for pytest in $FINLEY_PYTESTS |
|
|
do |
|
|
echo "running finley python test: $pytest" |
|
|
python $pytest |
|
|
if [ $? != 0 ] |
|
|
then |
|
|
echo "python testing failed for $pytest in module $module" |
|
|
echo "finley py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
|
|
FAIL=1 |
|
|
fi |
|
|
done |
|
|
cd ../../.. |
|
|
|
|
|
cd bruce/test/python |
|
|
for pytest in $BRUCE_PYTESTS |
|
|
do |
|
|
echo "running bruce python test: $pytest" |
|
|
python $pytest |
|
|
if [ $? != 0 ] |
|
|
then |
|
|
echo "python testing failed for $pytest in module $module" |
|
|
echo "bruce py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
|
|
FAIL=1 |
|
|
fi |
|
|
done |
|
|
cd ../../.. |
|
|
|
|
|
if [ $FAIL == 0 ] |
|
|
then |
|
|
echo success |
|
|
echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
|
81 |
fi |
fi |
|
exit 0 |
|