/[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

trunk/autotest-scons revision 707 by gross, Wed Apr 12 23:58:02 2006 UTC branches/arrayview_from_1695_trunk/autotest-scons revision 1781 by jfenwick, Thu Sep 11 05:03:14 2008 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  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"  START=`date '+%Y/%m/%d %H:%M'`
16    
17  # the python tests to run  SCRIPT_NAME=$0
18  BRUCE_PYTESTS="ImportTest.passed BruceTest.passed test_utilOnBruce.py"  
19  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"  finish () {
20  FINLEY_PYTESTS="ImportTest.passed finleyTest.passed SimpleSolve.passed RecTest.passed test_linearPDEsOnFinley.passed test_generators.passed test_visualization_interface.passed test_utilOnFinley.passed"    # state will be 'FAILURE' or 'SUCCESS'
21      state="$1"
22  echo "===> cd $1"    message="$2"
23  cd $1    date
24  if [ $? != 0 ]    # Clean up the sandbox
25  then    cd $TEST_DIR
26    echo "couldnt cd $1"    /bin/rm -rf sandbox.$RunDate
27    echo "couldnt cd $1" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS    END=`date '+%Y/%m/%d %H:%M'`
28    exit 1    cat << END_MSG | mail -s "ESYS_TESTS $TEST_NAME $RunDate $state" $MAIL_RECIPIENTS
29  fi  $message.
30    The tests ran from $START to $END on $NCPUS cores
31  PWD=`pwd`  See the log files in $TEST_DIR/Logs/$RunDate*
32  echo "===> working in: $PWD"  This mail was sent by $SCRIPT_NAME
33    running as $USER on `hostname`.
34  # Setup the environment  END_MSG
35  . ${MODULESHOME}/init/sh    # There are three ways to see errors:
36  module load intel_cc.9.0.026    # egrep 'FAIL|Error:|error set =' $TEST_DIR/Logs/$RunDate.test.output
37  export MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6    if [ "x$state" = "xFAILURE" ]; then
38  module load python/2.4.1      touch Logs/$RunDate.FAILURE
39  module load boost/1.33.0/python-2.4.1      exit 1
40  module load numarray/1.3.3    fi
41      exit 0
42  # set openmp settings  }
43  export OMP_NUM_THREADS=4  
44    
45  echo "===> svn update"  cat /dev/null > $TEST_DIR/Logs/$RunDate.test.output \
46  svn update                      || finish FAILURE "Could not create out_file $TEST_DIR/Logs/$RunDate.test.output"
47  if [ $? != 0 ]  
48  then  # Save output in Logs/date.test.output
49    echo "svn update failed"  exec 1> $TEST_DIR/Logs/$RunDate.test.output 2>&1
50    echo "svn update failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  
51    exit 2  
52  fi  cd $TEST_DIR                || finish FAILURE "Could not cd to WorkDir $TEST_DIR"
53    
54  echo "===> scons building esys"  test -d Logs || mkdir Logs
55  scons  
56  if [ $? != 0 ]  umask 022
57  then  
58    echo "scons build failed"  test -d sandbox.$RunDate        && finish FAILURE "Today's sandbox already exists"
59    echo "scons build failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  mkdir sandbox.$RunDate          || finish FAILURE "Could not mkdir sandbox"
60    exit 3  cd sandbox.$RunDate         || finish FAILURE "Could not cd to sandbox"
61  fi  
62    # Load modules
63  echo "===> building unit_tests"  . /usr/share/modules/init/sh
64  scons build_all_tests  module load escript/current
65  if [ $? != 0 ]  module load subversion-1.3.1
66  then  module load pbs
67    echo "build_tests failed"  
68    echo "build_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  echo "Checking out esys13/trunk"
69    exit 3  svn checkout svn+ssh://shake200.esscc.uq.edu.au/home/www_svn/repos/esys13/trunk >> $TEST_DIR/Logs/$RunDate.test.output 2>&1 \
70  fi                      || finish FAILURE "Could not check out esys13/trunk"
71    
72  FAIL=0  export LD_LIBRARY_PATH="$TEST_DIR/lib:$LD_LIBRARY_PATH"
73    export PYTHONPATH="$TEST_DIR:$PYTHONPATH"
74  echo "===> running unit_tests"  
75  scons run_all_tests  # How many threads? One per CPU.
76  if [ $? != 0 ]  export OMP_NUM_THREADS=1
77  then  
78    echo "run_all_tests failed"  # Run the tests
79    echo "run_all_tests failed" | mail -s "esys autotest-scons results" $MAIL_RECIPIENTS  echo "Running the tests $TEST_NAME"
80    exit 4  cd trunk                || finish FAILURE "Could not cd to trunk"
81  fi  scons dodebug=no useMPI=no -j $NCPUS $TEST_NAME >> $TEST_DIR/Logs/$RunDate.test.output 2>&1 \
82                        || finish FAILURE "Could not run scons $TEST_NAME"
83    
84    echo "Cleaning up after the tests"
85    
86    # Delete files older than 60 days
87    find $TEST_DIR -ctime +60 -exec rm -f {} \;
88    
89    finish SUCCESS "Successfully ran 'scons $TEST_NAME' on `hostname`"
90    

Legend:
Removed from v.707  
changed lines
  Added in v.1781

  ViewVC Help
Powered by ViewVC 1.1.26