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

Diff of /branches/windows_from_1431_trunk/autotest-scons

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

revision 344 by svn, Tue Dec 13 05:17:32 2005 UTC revision 721 by elspeth, Sat Apr 29 06:59:59 2006 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    #          Copyright 2006 by ACcESS MNRF
3    #
4    #              http://www.access.edu.au
5    #       Primary Business: Queensland, Australia
6    #  Licensed under the Open Software License version 3.0
7    #     http://www.opensource.org/licenses/osl-3.0.php
8    #
9    #
10    #
11  # $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $  # $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $
12  # An explicit testing script for esys using the scons build system  # An explicit testing script for esys using the scons build system
13    
14  # list of users to email test results to  # list of users to email test results to
15  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"  # currently disabled during testing.
16    # 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"
17  # modules to test  MAIL_RECIPIENTS="elspeth@esscc.uq.edu.au"
 TESTS="escript bruce finley"  
18    
19  # the python tests to run  # the python tests to run
20  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"  BRUCE_PYTESTS="ImportTest.passed BruceTest.passed test_utilOnBruce.py"
21  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"  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"
22  BRUCE_PYTESTS="ImportTest.py BruceTest.py test_utilOnBruce.py test_symbolsOnBruce.py"  FINLEY_PYTESTS="ImportTest.passed finleyTest.passed SimpleSolve.passed RecTest.passed test_linearPDEsOnFinley.passed test_generators.passed test_visualization_interface.passed test_utilOnFinley.passed"
   
 PWD=`pwd`  
 echo working in: $PWD  
23    
24  # define compiler executable and library locations  # Changed slightly to cope with new script, so it doesn't stomp all over previous iterations
 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  
   
 # define python location  
 export PATH=/raid2/tools/python-2.3.4/bin:$PATH  
   
 # set library and openmp settings  
 export LD_LIBRARY_PATH=$PWD/lib:/raid2/tools/boost/lib:$LD_LIBRARY_PATH  
 export PYTHONPATH=$PWD  
 export OMP_SCHEDULE="dynamic"  
 export OMP_NUM_THREADS=4  
 export OMP_DYNAMIC=TRUE  
 export OMP_NESTED=FALSE  
   
 FAIL=0  
25    
26  echo cd $1  echo "===> cd $1"
27  cd $1  cd $1
28  if [ $? != 0 ]  if [ $? != 0 ]
29  then  then
30    echo couldnt cd $1    echo "couldnt cd $1"
31    echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS    echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
32    exit 1    exit 1
33  fi  fi
34    
35  echo running svn update  # this is for the automated script
36  svn update  echo "===> change up a directory"
37  if [ $? != 0 ]  cd ..
38  then  echo "===> make a sandbox and work in that"
39    echo svn update failed  mkdir sandbox
40    echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  cd sandbox
   exit 2  
 fi  
41    
42  echo running scons debug=1  PWD=`pwd`
43  scons debug=1  echo "===> working in: $PWD"
 if [ $? != 0 ]  
 then  
   echo scons failed  
   echo "scons failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
   exit 3  
 fi  
44    
45  echo running bruce unit_tests  # Setup the environment
46  cd bruce/test  echo "loading modules"
47  ./unit_test-scons  . ${MODULESHOME}/init/sh
48  if [ $? != 0 ]  module load intel_cc.9.0.026
49  then  export MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6
50    echo bruce unit_test failed  module load python/2.4.1
51    echo "bruce unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  module load boost/1.33.0/python-2.4.1
52    FAIL=1  module load numarray/1.3.3
 fi  
 cd ../..  
53    
54  echo running escript unit_tests  # set openmp settings
55  cd escript/test  export OMP_NUM_THREADS=4
 ./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  
   FAIL=1  
 fi  
 cd ../..  
56    
57  echo running finley unit_tests  # doesn't appear to work - don't know why.
58  cd finley/test  #echo "===> svn update"
59  ./unit_test-scons  #svn update
60    #if [ $? != 0 ]
61    #then
62    #  echo "svn update failed"
63    #  echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
64    #  exit 2
65    #fi
66    
67    # Need to test this bit yet.
68    echo "==> removing previous checkout"
69    rm -rf trunk/
70    ls
71    # This works - temporarily removed to speed up testing.
72    echo "==> svn checkout"
73    svn checkout svn+ssh://ess/esys13/trunk
74    if [ $? != 0 ]
75    then
76        echo "svn checkout failed"
77        echo "svn checkout failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
78        exit 2
79    fi
80    
81    echo "==> change to trunk"
82    ls trunk
83    cd trunk
84    
85    # This bit works. Commented out to speed up testing.
86    echo "===> scons building esys"
87    scons
88  if [ $? != 0 ]  if [ $? != 0 ]
89  then  then
90    echo finley unit_test failed    echo "scons build failed"
91    echo "finley unit_test 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
92    FAIL=1    exit 3
93  fi  fi
 cd ../..  
94    
95  echo running esysUtils unit_tests  # This bit works. Commented out to speed up testing.
96  cd esysUtils/test  echo "===> building unit_tests"
97  ./unit_test-scons  scons build_all_tests
98  if [ $? != 0 ]  if [ $? != 0 ]
99  then  then
100    echo esysUtils unit_test failed    echo "build_tests failed"
101    echo "esysUtils unit_test failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS    echo "build_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
102    FAIL=1    exit 3
103  fi  fi
 cd ../..  
104    
105  for module in $TESTS  FAIL=0
 do  
     echo "running python tests for: $module"  
     cd $module/test/python  
     if [ "$module" == "finley" ]  
     then  
         for pytest in $FINLEY_PYTESTS  
         do  
             echo "Running python test: $pytest"  
             python $pytest  
             if [ $? != 0 ]  
             then  
               echo Python Testing FAILED for $pytest in module $module  
               echo "finley py_test: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
               FAIL=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: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
               FAIL=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: $pytest failed - see autotest-scons logfile" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
               FAIL=1  
             fi  
         done  
     fi  
     cd ../../..  
 done  
106    
107  if [ $FAIL == 0 ]  #echo "===> running all tests"
108    #scons all_tests
109    if [ $? != 0 ]
110  then  then
111      echo success    echo "all_tests failed"
112      echo "success" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS    echo "all_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS
113      exit 4
114  fi  fi
 exit 0  

Legend:
Removed from v.344  
changed lines
  Added in v.721

  ViewVC Help
Powered by ViewVC 1.1.26