1 |
#!/bin/bash |
2 |
|
3 |
# $Id$ |
4 |
# An explicit testing script for esys |
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 |
|
9 |
# define compiler executable and library locations |
10 |
export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH |
11 |
export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib |
12 |
|
13 |
echo cd $1 |
14 |
cd $1 |
15 |
if [ $? != 0 ] |
16 |
then |
17 |
echo couldnt cd $1 |
18 |
echo "couldnt cd $1" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
19 |
exit 1 |
20 |
fi |
21 |
|
22 |
echo loading esys setup |
23 |
. ~jgs/bin/esys_setup |
24 |
if [ $? != 0 ] |
25 |
then |
26 |
echo couldnt load esys setup |
27 |
echo "couldnt load esys setup" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
28 |
exit 2 |
29 |
fi |
30 |
|
31 |
echo running svn update |
32 |
svn update |
33 |
if [ $? != 0 ] |
34 |
then |
35 |
echo svn update failed |
36 |
echo "svn update failed" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
37 |
exit 3 |
38 |
fi |
39 |
|
40 |
echo running mk uninstall |
41 |
./mk uninstall |
42 |
if [ $? != 0 ] |
43 |
then |
44 |
echo ./mk uninstall failed |
45 |
echo "./mk uninstall failed" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
46 |
exit 4 |
47 |
fi |
48 |
|
49 |
echo running mk install |
50 |
./mk install DEBUG |
51 |
if [ $? != 0 ] |
52 |
then |
53 |
echo ./mk install failed |
54 |
echo "./mk install failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
55 |
exit 5 |
56 |
fi |
57 |
|
58 |
echo running mk unit_test |
59 |
./mk unit_test |
60 |
if [ $? != 0 ] |
61 |
then |
62 |
echo ./mk unit_test failed |
63 |
echo "./mk unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
64 |
exit 6 |
65 |
fi |
66 |
|
67 |
echo running mk py_test |
68 |
./mk py_test |
69 |
if [ $? != 0 ] |
70 |
then |
71 |
echo ./mk py_test failed |
72 |
echo "./mk py_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
73 |
exit 7 |
74 |
fi |
75 |
|
76 |
echo "success" | mail -s "esys autotest results" $MAIL_RECIPIENTS |
77 |
exit 0 |