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

Diff of /trunk/autotest-scons

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

revision 330 by svn, Wed Dec 7 06:31:27 2005 UTC revision 700 by gross, Thu Apr 6 00:13:40 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="gross@esscc.uq.edu.au elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au robert.woodcock@csiro.au Peter.Hornby@csiro.au"
 MAIL_RECIPIENTS="jgs@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.passed BruceTest.passed 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.passed BinaryOps.passed UnaryOps.passed SliceGetting.passed SliceSetting.passed MiscTests.passed ArchiveTests.passed newEscriptTests.passed test_xml.passed insituTests.passed s2.passed"
12  ESCRIPT_PYTESTS="ImportTest.py BinaryOps.py UnaryOps.py SliceGetting.py SliceSetting.py MiscTests.py newEscriptTests.py DataVariableTests.py"  FINLEY_PYTESTS="ImportTest.passed finleyTest.passed SimpleSolve.passed RecTest.passed test_linearPDEsOnFinley.passed test_generators.passed test_visualization_interface.passed test_utilOnFinley.passed"
 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    # Setup the environment
27    . ${MODULESHOME}/init/sh
28    module load intel_cc.9.0.026
29    export MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6
30    module load boost/1.33.0/python-2.4.1
31    module load python/2.4.1
32    module load numarray/1.3.3
33    
34    # set openmp settings
35    export OMP_NUM_THREADS=4
36    
37    echo "===> svn update"
38    svn update
39  if [ $? != 0 ]  if [ $? != 0 ]
40  then  then
41    echo couldnt load scons setup    echo "svn update failed"
42    echo "couldnt load scons setup" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
43    exit 2    exit 2
44  fi  fi
45    
46  echo running svn update  echo "===> scons building esys"
47  svn update  scons
48  if [ $? != 0 ]  if [ $? != 0 ]
49  then  then
50    echo svn update failed    echo "scons build failed"
51    echo "svn update failed" | mail -s "esys autotest results" $MAIL_RECIPIENTS    echo "scons build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
52    exit 3    exit 3
53  fi  fi
54    
55  echo running scons debug=1  echo "===> building unit_tests"
56  scons debug=1  scons build_tests
57  if [ $? != 0 ]  if [ $? != 0 ]
58  then  then
59    echo scons failed    echo "unit_test build failed"
60    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
61    exit 5    exit 3
62  fi  fi
63    
64  echo running bruce unit_tests  FAIL=0
65  cd bruce/test  
66  ./unit_test-scons  echo "===> running unit_tests"
67  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  
68  if [ $? != 0 ]  if [ $? != 0 ]
69  then  then
70    echo finley unit_test failed    echo "unit_testing failed"
71    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
72    exit 6    FAIL=1
73  fi  fi
74  cd ../..  
75    exit
76  export LD_LIBRARY_PATH=/raid2/tools/python-2.3.4/lib:$LD_LIBRARY_PATH  for pytest in $ESCRIPT_PYTESTS
77  export PYTHON_INCLUDE=/raid2/tools/python-2.3.4/include/python2.3  do
78  export PYTHON_LIB_PATH=/raid2/tools/python-2.3.4/lib    echo "===>running escript python test: $pytest"
79  export PATH=/raid2/tools/python-2.3.4/bin:$PATH    scons build/posix/escript/test/python/$pytest
80      if [ $? != 0 ]
81      then
82        echo "python testing failed for $pytest in module $module"
83        echo "escript py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
84        FAIL=1
85      fi
86    done
87    
88  for module in $TESTS  for pytest in $FINLEY_PYTESTS
89  do  do
90      echo "running python tests for: $module"    echo "running finley python test: $pytest"
91      cd $module/test/python    scons build/posix/finley/test/python/$pytest
92      if [ "$module" == "finley" ]    if [ $? != 0 ]
93      then    then
94          for pytest in $FINLEY_PYTESTS      echo "python testing failed for $pytest in module $module"
95          do      echo "finley py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
96              echo "Running python test: $pytest"      FAIL=1
97              python $pytest    fi
             if [ $? != 0 ]  
             then  
               echo Python Testing FAILED for $pytest in module $module  
               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  
               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  
               exit 1  
             fi  
         done  
     fi  
     cd ../../..  
98  done  done
99    
100  echo "success" | mail -s "esys autotest results" $MAIL_RECIPIENTS  for pytest in $BRUCE_PYTESTS
101    do
102      echo "running bruce python test: $pytest"
103      scons build/posix/bruce/test/python/$pytest
104      if [ $? != 0 ]
105      then
106        echo "python testing failed for $pytest in module $module"
107        echo "bruce py_test: $pytest failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
108        FAIL=1
109      fi
110    done
111    
112    if [ $FAIL == 0 ]
113    then
114        echo success
115        echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
116    fi
117  exit 0  exit 0

Legend:
Removed from v.330  
changed lines
  Added in v.700

  ViewVC Help
Powered by ViewVC 1.1.26