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

Diff of /branches/more_shared_ptrs_from_1812/autotest-scons

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

trunk/autotest-scons revision 320 by svn, Tue Dec 6 04:35:27 2005 UTC branches/more_shared_ptrs_from_1812/autotest-scons revision 1813 by jfenwick, Fri Sep 26 00:58:05 2008 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3  # $Id: autotest 162 2005-11-11 00:09:59Z svn $  # The test suite no longer runs as a PBS job (can't compile jobs on a
4  # An explicit testing script for esys using the scons build system  # compute node because the compilers are on local disk of the login node)
5    
6  # list of users to email test results to  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  #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="k.steube@uq.edu.au"
8  MAIL_RECIPIENTS="jgs@esscc.uq.edu.au"  
9    NCPUS=4
10  # define compiler executable and library locations  TEST_DIR=/data1/ksteube/EscriptDev/AutoTests
11  export PATH=/opt/intel/cmplrs/80.058/intel_cc_80/bin:$PATH  TEST_NAME='all_tests'
12  export LD_LIBRARY_PATH=/opt/intel/cmplrs/80.058/intel_cc_80/lib  
13    RunDate=`date '+%Y_%m_%d'`  # Time stamp for log file names
14  echo cd $1  
15  cd $1  START=`date '+%Y/%m/%d %H:%M'`
16  if [ $? != 0 ]  
17  then  SCRIPT_NAME=$0
18    echo couldnt cd $1  
19    echo "couldnt cd $1" | mail -s "esys autotest results" $MAIL_RECIPIENTS  finish () {
20    exit 1    # state will be 'FAILURE' or 'SUCCESS'
21  fi    state="$1"
22      message="$2"
23  echo loading esys setup    date
24  . ~jgs/bin/scons_setup    # Clean up the sandbox
25  if [ $? != 0 ]    cd $TEST_DIR
26  then    /bin/rm -rf sandbox.$RunDate
27    echo couldnt load scons setup    END=`date '+%Y/%m/%d %H:%M'`
28    echo "couldnt load scons setup" | mail -s "esys autotest results" $MAIL_RECIPIENTS    cat << END_MSG | mail -s "ESYS_TESTS $TEST_NAME $RunDate $state" $MAIL_RECIPIENTS
29    exit 2  $message.
30  fi  The tests ran from $START to $END on $NCPUS cores
31    See the log files in $TEST_DIR/Logs/$RunDate*
32  echo running svn update  This mail was sent by $SCRIPT_NAME
33  svn update  running as $USER on `hostname`.
34  if [ $? != 0 ]  END_MSG
35  then    # There are three ways to see errors:
36    echo svn update failed    # egrep 'FAIL|Error:|error set =' $TEST_DIR/Logs/$RunDate.test.output
37    echo "svn update failed" | mail -s "esys autotest results" $MAIL_RECIPIENTS    if [ "x$state" = "xFAILURE" ]; then
38    exit 3      touch Logs/$RunDate.FAILURE
39  fi      exit 1
40      fi
41  echo running scons debug=1    exit 0
42  scons debug=1  }
43  if [ $? != 0 ]  
44  then  
45    echo scons failed  cat /dev/null > $TEST_DIR/Logs/$RunDate.test.output \
46    echo "scons failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS                      || finish FAILURE "Could not create out_file $TEST_DIR/Logs/$RunDate.test.output"
47    exit 5  
48  fi  # Save output in Logs/date.test.output
49    exec 1> $TEST_DIR/Logs/$RunDate.test.output 2>&1
50  echo running bruce unit_tests  
51  cd bruce/test  
52  ./unit_test-scons  cd $TEST_DIR                || finish FAILURE "Could not cd to WorkDir $TEST_DIR"
53  if [ $? != 0 ]  
54  then  test -d Logs || mkdir Logs
55    echo bruce unit_test failed  
56    echo "bruce unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  umask 022
57    exit 6  
58  fi  test -d sandbox.$RunDate        && finish FAILURE "Today's sandbox already exists"
59  cd ../..  mkdir sandbox.$RunDate          || finish FAILURE "Could not mkdir sandbox"
60    cd sandbox.$RunDate         || finish FAILURE "Could not cd to sandbox"
61  echo running escript unit_tests  
62  cd escript/test  # Load modules
63  ./unit_test-scons  . /usr/share/modules/init/sh
64  if [ $? != 0 ]  module load escript/current
65  then  module load subversion-1.3.1
66    echo escript unit_test failed  module load pbs
67    echo "escript unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
68    exit 6  echo "Checking out esys13/trunk"
69  fi  svn checkout svn+ssh://shake200.esscc.uq.edu.au/home/www_svn/repos/esys13/trunk >> $TEST_DIR/Logs/$RunDate.test.output 2>&1 \
70  cd ../..                      || finish FAILURE "Could not check out esys13/trunk"
71    
72  echo running finley unit_tests  export LD_LIBRARY_PATH="$TEST_DIR/lib:$LD_LIBRARY_PATH"
73  cd finley/test  export PYTHONPATH="$TEST_DIR:$PYTHONPATH"
74  ./unit_test-scons  
75  if [ $? != 0 ]  # How many threads? One per CPU.
76  then  export OMP_NUM_THREADS=1
77    echo finley unit_test failed  
78    echo "finley unit_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  # Run the tests
79    exit 6  echo "Running the tests $TEST_NAME"
80  fi  cd trunk                || finish FAILURE "Could not cd to trunk"
81  cd ../..  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  #echo running mk py_test  
84  #./mk py_test  echo "Cleaning up after the tests"
85  #if [ $? != 0 ]  
86  #then  # Delete files older than 60 days
87  #  echo ./mk py_test failed  find $TEST_DIR -ctime +60 -exec rm -f {} \;
88  #  echo "./mk py_test failed - see autotest logfile" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
89  #  exit 7  finish SUCCESS "Successfully ran 'scons $TEST_NAME' on `hostname`"
 #fi  
90    
 echo "success" | mail -s "esys autotest results" $MAIL_RECIPIENTS  
 exit 0  

Legend:
Removed from v.320  
changed lines
  Added in v.1813

  ViewVC Help
Powered by ViewVC 1.1.26