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

Diff of /trunk/autotest-scons

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

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

Legend:
Removed from v.336  
changed lines
  Added in v.365

  ViewVC Help
Powered by ViewVC 1.1.26