1 |
woo409 |
757 |
#!/bin/bash |
2 |
|
|
# Copyright 2006 by ACcESS MNRF |
3 |
gross |
707 |
# |
4 |
woo409 |
757 |
# 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 |
gross |
707 |
# |
9 |
|
|
# |
10 |
|
|
# |
11 |
woo409 |
757 |
# $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $ |
12 |
|
|
# An explicit testing script for esys using the scons build system |
13 |
jgs |
318 |
|
14 |
woo409 |
757 |
# list of users to email test results to |
15 |
|
|
# currently disabled during testing. |
16 |
|
|
# 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" |
17 |
|
|
MAIL_RECIPIENTS="elspeth@esscc.uq.edu.au" |
18 |
jgs |
318 |
|
19 |
woo409 |
757 |
# the python tests to run |
20 |
|
|
BRUCE_PYTESTS="ImportTest.passed BruceTest.passed test_utilOnBruce.py" |
21 |
|
|
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" |
22 |
|
|
FINLEY_PYTESTS="ImportTest.passed finleyTest.passed SimpleSolve.passed RecTest.passed test_linearPDEsOnFinley.passed test_generators.passed test_visualization_interface.passed test_utilOnFinley.passed" |
23 |
jgs |
321 |
|
24 |
woo409 |
757 |
# Changed slightly to cope with new script, so it doesn't stomp all over previous iterations |
25 |
elspeth |
721 |
|
26 |
woo409 |
757 |
echo "===> cd $1" |
27 |
|
|
cd $1 |
28 |
|
|
if [ $? != 0 ] |
29 |
|
|
then |
30 |
|
|
echo "couldnt cd $1" |
31 |
|
|
echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
32 |
|
|
exit 1 |
33 |
|
|
fi |
34 |
svn |
346 |
|
35 |
woo409 |
757 |
# this is for the automated script |
36 |
|
|
echo "===> change up a directory" |
37 |
|
|
cd .. |
38 |
|
|
echo "===> make a sandbox and work in that" |
39 |
|
|
mkdir sandbox |
40 |
|
|
cd sandbox |
41 |
elspeth |
721 |
|
42 |
woo409 |
757 |
PWD=`pwd` |
43 |
|
|
echo "===> working in: $PWD" |
44 |
jgs |
321 |
|
45 |
woo409 |
757 |
# Setup the environment |
46 |
|
|
echo "loading modules" |
47 |
|
|
. ${MODULESHOME}/init/sh |
48 |
|
|
module load intel_cc.9.0.026 |
49 |
|
|
export MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6 |
50 |
|
|
module load python/2.4.1 |
51 |
robwdcock |
683 |
module load boost/1.33.0/python-2.4.1 |
52 |
woo409 |
757 |
module load numarray/1.3.3 |
53 |
jgs |
318 |
|
54 |
woo409 |
757 |
# set openmp settings |
55 |
|
|
export OMP_NUM_THREADS=4 |
56 |
svn |
344 |
|
57 |
woo409 |
757 |
# doesn't appear to work - don't know why. |
58 |
|
|
#echo "===> svn update" |
59 |
|
|
#svn update |
60 |
|
|
#if [ $? != 0 ] |
61 |
|
|
#then |
62 |
|
|
# echo "svn update failed" |
63 |
|
|
# echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
64 |
|
|
# exit 2 |
65 |
|
|
#fi |
66 |
elspeth |
721 |
|
67 |
woo409 |
757 |
# Need to test this bit yet. |
68 |
|
|
echo "==> removing previous checkout" |
69 |
|
|
rm -rf trunk/ |
70 |
|
|
ls |
71 |
|
|
# This works - temporarily removed to speed up testing. |
72 |
|
|
echo "==> svn checkout" |
73 |
|
|
svn checkout svn+ssh://ess/esys13/trunk |
74 |
|
|
if [ $? != 0 ] |
75 |
|
|
then |
76 |
|
|
echo "svn checkout failed" |
77 |
|
|
echo "svn checkout failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
78 |
|
|
exit 2 |
79 |
|
|
fi |
80 |
jgs |
319 |
|
81 |
woo409 |
757 |
echo "==> change to trunk" |
82 |
|
|
ls trunk |
83 |
|
|
cd trunk |
84 |
elspeth |
721 |
|
85 |
woo409 |
757 |
# This bit works. Commented out to speed up testing. |
86 |
|
|
echo "===> scons building esys" |
87 |
|
|
scons |
88 |
|
|
if [ $? != 0 ] |
89 |
|
|
then |
90 |
|
|
echo "scons build failed" |
91 |
|
|
echo "scons build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
92 |
|
|
exit 3 |
93 |
|
|
fi |
94 |
svn |
320 |
|
95 |
woo409 |
757 |
# This bit works. Commented out to speed up testing. |
96 |
|
|
echo "===> building unit_tests" |
97 |
|
|
scons build_all_tests |
98 |
|
|
if [ $? != 0 ] |
99 |
|
|
then |
100 |
|
|
echo "build_tests failed" |
101 |
|
|
echo "build_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
102 |
|
|
exit 3 |
103 |
|
|
fi |
104 |
jgs |
318 |
|
105 |
woo409 |
757 |
FAIL=0 |
106 |
jgs |
365 |
|
107 |
woo409 |
757 |
#echo "===> running all tests" |
108 |
|
|
#scons all_tests |
109 |
|
|
if [ $? != 0 ] |
110 |
|
|
then |
111 |
|
|
echo "all_tests failed" |
112 |
|
|
echo "all_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS |
113 |
|
|
exit 4 |
114 |
|
|
fi |