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

Diff of /branches/escript3047_with_pastix2995/autotest-scons

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

revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC revision 2368 by gross, Mon Apr 6 05:05:35 2009 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #          Copyright 2006 by ACcESS MNRF  
3  #  # The test suite no longer runs as a PBS job (can't compile jobs on a
4  #              http://www.access.edu.au  # compute node because the compilers are on local disk of the login node)
5  #       Primary Business: Queensland, Australia  
6  #  Licensed under the Open Software License version 3.0  MAIL_RECIPIENTS="l.gross@uq.edu.au Peter.Hornby@csiro.au k.steube@uq.edu.au artak@uq.edu.au c.altinay@uq.edu.au j.fenwick1@uq.edu.au"
7  #     http://www.opensource.org/licenses/osl-3.0.php  # MAIL_RECIPIENTS="k.steube@uq.edu.au"
8  #  
9  #  NCPUS=4
10  #  TEST_DIR=/data1/ksteube/EscriptDev/AutoTests
11  # $Id: autotest-scons 162 2005-11-11 00:09:59Z svn $  TEST_NAME='all_tests'
12  # An explicit testing script for esys using the scons build system  
13    RunDate=`date '+%Y_%m_%d'`  # Time stamp for log file names
14  # list of users to email test results to  
15  # currently disabled during testing.  START=`date '+%Y/%m/%d %H:%M'`
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  MAIL_RECIPIENTS="elspeth@esscc.uq.edu.au"  SCRIPT_NAME=$0
18    
19  # the python tests to run  finish () {
20  BRUCE_PYTESTS="ImportTest.passed BruceTest.passed test_utilOnBruce.py"    # state will be 'FAILURE' or 'SUCCESS'
21  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"    state="$1"
22  FINLEY_PYTESTS="ImportTest.passed finleyTest.passed SimpleSolve.passed RecTest.passed test_linearPDEsOnFinley.passed test_generators.passed test_visualization_interface.passed test_utilOnFinley.passed"    message="$2"
23      date
24  # Changed slightly to cope with new script, so it doesn't stomp all over previous iterations    # Clean up the sandbox
25      cd $TEST_DIR
26  echo "===> cd $1"    /bin/rm -rf sandbox.$RunDate
27  cd $1    END=`date '+%Y/%m/%d %H:%M'`
28  if [ $? != 0 ]    cat << END_MSG | mail -s "ESYS_TESTS $TEST_NAME $RunDate $state" $MAIL_RECIPIENTS
29  then  $message.
30    echo "couldnt cd $1"  The tests ran from $START to $END on $NCPUS cores
31    echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  See the log files in $TEST_DIR/Logs/$RunDate*
32    exit 1  This mail was sent by $SCRIPT_NAME
33  fi  running as $USER on `hostname`.
34    END_MSG
35  # this is for the automated script    # There are three ways to see errors:
36  echo "===> change up a directory"    # egrep 'FAIL|Error:|error set =' $TEST_DIR/Logs/$RunDate.test.output
37  cd ..    if [ "x$state" = "xFAILURE" ]; then
38  echo "===> make a sandbox and work in that"      touch Logs/$RunDate.FAILURE
39  mkdir sandbox      exit 1
40  cd sandbox    fi
41      exit 0
42  PWD=`pwd`  }
43  echo "===> working in: $PWD"  
44    
45  # Setup the environment  cat /dev/null > $TEST_DIR/Logs/$RunDate.test.output \
46  echo "loading modules"                      || finish FAILURE "Could not create out_file $TEST_DIR/Logs/$RunDate.test.output"
47  . ${MODULESHOME}/init/sh  
48  module load intel_cc.9.0.026  # Save output in Logs/date.test.output
49  export MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6  exec 1> $TEST_DIR/Logs/$RunDate.test.output 2>&1
50  module load python/2.4.1  
51  module load boost/1.33.0/python-2.4.1  
52  module load numarray/1.3.3  cd $TEST_DIR                || finish FAILURE "Could not cd to WorkDir $TEST_DIR"
53    
54  # set openmp settings  test -d Logs || mkdir Logs
55  export OMP_NUM_THREADS=4  
56    umask 022
57  # doesn't appear to work - don't know why.  
58  #echo "===> svn update"  test -d sandbox.$RunDate        && finish FAILURE "Today's sandbox already exists"
59  #svn update  mkdir sandbox.$RunDate          || finish FAILURE "Could not mkdir sandbox"
60  #if [ $? != 0 ]  cd sandbox.$RunDate         || finish FAILURE "Could not cd to sandbox"
61  #then  
62  #  echo "svn update failed"  # Load modules
63  #  echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  . /usr/share/modules/init/sh
64  #  exit 2  module load escript/current
65  #fi  module load subversion-1.3.1
66    module load pbs
67  # Need to test this bit yet.  
68  echo "==> removing previous checkout"  echo "Checking out esys13/trunk"
69  rm -rf trunk/  svn checkout svn+ssh://shake200.esscc.uq.edu.au/home/www_svn/repos/esys13/trunk >> $TEST_DIR/Logs/$RunDate.test.output 2>&1 \
70  ls                      || finish FAILURE "Could not check out esys13/trunk"
71  # This works - temporarily removed to speed up testing.  
72  echo "==> svn checkout"  export LD_LIBRARY_PATH="$TEST_DIR/lib:$LD_LIBRARY_PATH"
73  svn checkout svn+ssh://ess/esys13/trunk  export PYTHONPATH="$TEST_DIR:$PYTHONPATH"
74  if [ $? != 0 ]  
75  then  # How many threads? One per CPU.
76      echo "svn checkout failed"  export OMP_NUM_THREADS=$NCPUS
77      echo "svn checkout failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
78      exit 2  # Run the tests
79  fi  echo "Running the tests $TEST_NAME"
80    cd trunk                || finish FAILURE "Could not cd to trunk"
81  echo "==> change to trunk"  scons dodebug=no useMPI=no -j $NCPUS $TEST_NAME >> $TEST_DIR/Logs/$RunDate.test.output 2>&1 \
82  ls trunk                      || finish FAILURE "Could not run scons $TEST_NAME"
83  cd trunk  
84    echo "Cleaning up after the tests"
85  # This bit works. Commented out to speed up testing.  
86  echo "===> scons building esys"  # Delete files older than 60 days
87  scons  find $TEST_DIR -ctime +60 -exec rm -f {} \;
88  if [ $? != 0 ]  
89  then  finish SUCCESS "Successfully ran 'scons $TEST_NAME' on `hostname`"
90    echo "scons build failed"  
   echo "scons build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
   exit 3  
 fi  
   
 # This bit works. Commented out to speed up testing.  
 echo "===> building unit_tests"  
 scons build_all_tests  
 if [ $? != 0 ]  
 then  
   echo "build_tests failed"  
   echo "build_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
   exit 3  
 fi  
   
 FAIL=0  
   
 #echo "===> running all tests"  
 #scons all_tests  
 if [ $? != 0 ]  
 then  
   echo "all_tests failed"  
   echo "all_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
   exit 4  
 fi  

Legend:
Removed from v.757  
changed lines
  Added in v.2368

  ViewVC Help
Powered by ViewVC 1.1.26