/[escript]/branches/arrayview_from_1695_trunk/autotest-scons
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/autotest-scons

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

revision 331 by svn, Wed Dec 7 06:46:24 2005 UTC revision 523 by gross, Tue Feb 14 05:54:41 2006 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 elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au"
   
 #modules to test  
 TESTS="escript bruce finley"  
8    
9  # the python tests to run  # the python tests to run
10  FINLEY_PYTESTS="ImportTest.py SimpleSolve.py GradTest.py test_linearPDEsOnFinley.py test_generators.py test_visualization_interface.py test_utilOnFinley.py test_symbolsOnFinley.py"  BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py"
11  #ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py DataVariableTests.py test_xml.py"  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 s2.py"
12  ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py DataVariableTests.py"  FINLEY_PYTESTS="ImportTest.py finleyTest.py SimpleSolve.py RecTest.py test_linearPDEsOnFinley.py test_generators.py test_visualization_interface.py test_utilOnFinley.py"
 BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py"  
   
   
 # define compiler executable and library locations  
 export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH  
 export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib  
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 python paths
34    export LD_LIBRARY_PATH=$PWD/lib:/raid2/tools/boost/lib:$LD_LIBRARY_PATH
35    export PYTHONPATH=$PWD
36    
37    # set openmp settings
38    export OMP_SCHEDULE="dynamic"
39    export OMP_NUM_THREADS=4
40    export OMP_DYNAMIC=TRUE
41    export OMP_NESTED=FALSE
42    
43    echo "===> svn update"
44    svn update
45  if [ $? != 0 ]  if [ $? != 0 ]
46  then  then
47    echo couldnt load scons setup    echo "svn update failed"
48    echo "couldnt load scons setup" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
49    exit 2    exit 2
50  fi  fi
51    
52  echo running svn update  echo "===> scons building esys"
53  svn update  scons
54  if [ $? != 0 ]  if [ $? != 0 ]
55  then  then
56    echo svn update failed    echo "scons build failed"
57    echo "svn update failed" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "scons build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
58    exit 3    exit 3
59  fi  fi
60    
61  echo running scons debug=1  echo "===> building unit_tests"
62  scons debug=1  scons build_tests
63  if [ $? != 0 ]  if [ $? != 0 ]
64  then  then
65    echo scons failed    echo "unit_test build failed"
66    echo "scons failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "unit_test build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
67    exit 5    exit 3
68  fi  fi
69    
70  echo running bruce unit_tests  FAIL=0
71  cd bruce/test  
72  ./unit_test-scons  echo "===> running unit_tests"
73  if [ $? != 0 ]  scons run_tests
 then  
   echo bruce unit_test failed  
   echo "bruce unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
   exit 6  
 fi  
 cd ../..  
   
 echo running escript unit_tests  
 cd escript/test  
 ./unit_test-scons  
 if [ $? != 0 ]  
 then  
   echo escript unit_test failed  
   echo "escript unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
   exit 6  
 fi  
 cd ../..  
   
 echo running finley unit_tests  
 cd finley/test  
 ./unit_test-scons  
74  if [ $? != 0 ]  if [ $? != 0 ]
75  then  then
76    echo finley unit_test failed    echo "unit_testing failed"
77    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
78    exit 6    FAIL=1
79  fi  fi
 cd ../..  
   
 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  
80    
81  for module in $TESTS  cd escript/test/python
82    for pytest in $ESCRIPT_PYTESTS
83  do  do
84      echo "running python tests for: $module"    echo "===>running escript python test: $pytest"
85      cd $module/test/python    python $pytest
86      if [ "$module" == "finley" ]    if [ $? != 0 ]
87      then    then
88          for pytest in $FINLEY_PYTESTS      echo "python testing failed for $pytest in module $module"
89          do      echo "escript py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
90              echo "Running python test: $pytest"      FAIL=1
91              python $pytest    fi
             if [ $? != 0 ]  
             then  
               echo Python Testing FAILED for $pytest in module $module  
               echo "finley py_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
               exit 1  
             fi  
         done  
     elif [ "$module" == "escript" ]  
     then  
         for pytest in $ESCRIPT_PYTESTS  
         do  
             echo "Running python test: $pytest"  
             python $pytest  
             if [ $? != 0 ]  
             then  
               echo Python Testing FAILED for $pytest in module $module  
               echo "escript py_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
               exit 1  
             fi  
         done  
     elif [ "$module" == "bruce" ]  
     then  
         for pytest in $BRUCE_PYTESTS  
         do  
             echo "Running python test: $pytest"  
             python $pytest  
             if [ $? != 0 ]  
             then  
               echo Python Testing FAILED for $pytest in module $module  
               echo "bruce py_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
               exit 1  
             fi  
         done  
     fi  
     cd ../../..  
92  done  done
93    cd ../../..
94    
95  echo "success" | mail -s "esys autotest results" $MAIL_RECIPIENTS  cd finley/test/python
96    for pytest in $FINLEY_PYTESTS
97    do
98      echo "running finley python test: $pytest"
99      python $pytest
100      if [ $? != 0 ]
101      then
102        echo "python testing failed for $pytest in module $module"
103        echo "finley py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
104        FAIL=1
105      fi
106    done
107    cd ../../..
108    
109    cd bruce/test/python
110    for pytest in $BRUCE_PYTESTS
111    do
112      echo "running bruce python test: $pytest"
113      python $pytest
114      if [ $? != 0 ]
115      then
116        echo "python testing failed for $pytest in module $module"
117        echo "bruce py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
118        FAIL=1
119      fi
120    done
121    cd ../../..
122    
123    if [ $FAIL == 0 ]
124    then
125        echo success
126        echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
127    fi
128  exit 0  exit 0

Legend:
Removed from v.331  
changed lines
  Added in v.523

  ViewVC Help
Powered by ViewVC 1.1.26