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

Diff of /trunk/autotest-scons

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 319 by jgs, Tue Dec 6 04:25:37 2005 UTC revision 366 by svn, Thu Dec 15 06:05:55 2005 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3  # $Id: autotest 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    
9  # define compiler executable and library locations  # the python tests to run
10  export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH  BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py"
11  export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib  ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py ArchiveTests.py newEscriptTests.py DataVariableTests.py test_xml.py"
12    FINLEY_PYTESTS="ImportTest.py finleyTest.py SimpleSolve.py GradTest.py RecTest.py test_linearPDEsOnFinley.py test_generators.py test_visualization_interface.py test_utilOnFinley.py test_symbolsOnFinley.py"
13    
14  echo cd $1  echo "===> cd $1"
15  cd $1  cd $1
16  if [ $? != 0 ]  if [ $? != 0 ]
17  then  then
18    echo couldnt cd $1    echo "couldnt cd $1"
19    echo "couldnt cd $1" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
20    exit 1    exit 1
21  fi  fi
22    
23  echo loading esys setup  PWD=`pwd`
24  . ~jgs/bin/scons_setup  echo "===> working in: $PWD"
25    
26    # define compiler executable and library locations
27    export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH
28    export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib
29    
30    # define python location
31    export PATH=/raid2/tools/python-2.3.4/bin:$PATH
32    
33    # set library and openmp settings
34    export LD_LIBRARY_PATH=$PWD/lib:/raid2/tools/boost/lib:$LD_LIBRARY_PATH
35    export PYTHONPATH=$PWD
36    export OMP_SCHEDULE="dynamic"
37    export OMP_NUM_THREADS=4
38    export OMP_DYNAMIC=TRUE
39    export OMP_NESTED=FALSE
40    
41    echo "===> svn update"
42    svn update
43  if [ $? != 0 ]  if [ $? != 0 ]
44  then  then
45    echo couldnt load scons setup    echo "svn update failed"
46    echo "couldnt load scons setup" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
47    exit 2    exit 2
48  fi  fi
49    
50  #echo running svn update  echo "===> scons building esys"
51  #svn update  scons debug=1
 #if [ $? != 0 ]  
 #then  
 #  echo svn update failed  
 #  echo "svn update failed" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
 #  exit 3  
 #fi  
 ##  
 #echo running scons debug=1  
 #scons debug=1  
 #if [ $? != 0 ]  
 #then  
 #  echo scons failed  
 #  echo "scons failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
 #  exit 5  
 #fi  
   
 echo running bruce unit_tests  
 cd bruce/test  
 ./unit_test  
52  if [ $? != 0 ]  if [ $? != 0 ]
53  then  then
54    echo bruce unit_test failed    echo "scons build failed"
55    echo "bruce unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "scons build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
56    exit 6    exit 3
57  fi  fi
58  cd ..  
59    echo "===> building unit_tests"
60  echo running escript unit_tests  scons debug=1 build_tests
 cd escript/test  
 ./unit_test  
61  if [ $? != 0 ]  if [ $? != 0 ]
62  then  then
63    echo escript unit_test failed    echo "unit_test build failed"
64    echo "escript unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "unit_test build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
65    exit 6    exit 3
66  fi  fi
67  cd ..  
68    FAIL=0
69  echo running finley unit_tests  
70  cd finley/test  echo "===> running unit_tests"
71  ./unit_test  scons debug=1 run_tests
72  if [ $? != 0 ]  if [ $? != 0 ]
73  then  then
74    echo finley unit_test failed    echo "unit_testing failed"
75    echo "finley unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "unit_test failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
76    exit 6    FAIL=1
77  fi  fi
78  cd ..  
79    cd escript/test/python
80  #echo running mk py_test  for pytest in $ESCRIPT_PYTESTS
81  #./mk py_test  do
82  #if [ $? != 0 ]    echo "===>running escript python test: $pytest"
83  #then    python $pytest
84  #  echo ./mk py_test failed    if [ $? != 0 ]
85  #  echo "./mk py_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS    then
86  #  exit 7      echo "python testing failed for $pytest in module $module"
87  #fi      echo "escript py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
88        FAIL=1
89      fi
90    done
91    cd ../../..
92    
93    cd finley/test/python
94    for pytest in $FINLEY_PYTESTS
95    do
96      echo "running finley python test: $pytest"
97      python $pytest
98      if [ $? != 0 ]
99      then
100        echo "python testing failed for $pytest in module $module"
101        echo "finley py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
102        FAIL=1
103      fi
104    done
105    cd ../../..
106    
107    cd bruce/test/python
108    for pytest in $BRUCE_PYTESTS
109    do
110      echo "running bruce python test: $pytest"
111      python $pytest
112      if [ $? != 0 ]
113      then
114        echo "python testing failed for $pytest in module $module"
115        echo "bruce py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
116        FAIL=1
117      fi
118    done
119    cd ../../..
120    
121  echo "success" | mail -s "esys autotest results" $MAIL_RECIPIENTS  if [ $FAIL == 0 ]
122    then
123        echo success
124        echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
125    fi
126  exit 0  exit 0

Legend:
Removed from v.319  
changed lines
  Added in v.366

  ViewVC Help
Powered by ViewVC 1.1.26