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

Contents of /branches/schroedinger_upto1946/autotest-scons

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1947 - (show annotations)
Wed Oct 29 23:19:45 2008 UTC (9 years ago) by jfenwick
File size: 2671 byte(s)
This does not actually have the changes in it yet.

1 #!/bin/bash
2
3 # The test suite no longer runs as a PBS job (can't compile jobs on a
4 # compute node because the compilers are on local disk of the login node)
5
6 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="k.steube@uq.edu.au"
8
9 NCPUS=4
10 TEST_DIR=/data1/ksteube/EscriptDev/AutoTests
11 TEST_NAME='all_tests'
12
13 RunDate=`date '+%Y_%m_%d'` # Time stamp for log file names
14
15 START=`date '+%Y/%m/%d %H:%M'`
16
17 SCRIPT_NAME=$0
18
19 finish () {
20 # state will be 'FAILURE' or 'SUCCESS'
21 state="$1"
22 message="$2"
23 date
24 # Clean up the sandbox
25 cd $TEST_DIR
26 /bin/rm -rf sandbox.$RunDate
27 END=`date '+%Y/%m/%d %H:%M'`
28 cat << END_MSG | mail -s "ESYS_TESTS $TEST_NAME $RunDate $state" $MAIL_RECIPIENTS
29 $message.
30 The tests ran from $START to $END on $NCPUS cores
31 See the log files in $TEST_DIR/Logs/$RunDate*
32 This mail was sent by $SCRIPT_NAME
33 running as $USER on `hostname`.
34 END_MSG
35 # There are three ways to see errors:
36 # egrep 'FAIL|Error:|error set =' $TEST_DIR/Logs/$RunDate.test.output
37 if [ "x$state" = "xFAILURE" ]; then
38 touch Logs/$RunDate.FAILURE
39 exit 1
40 fi
41 exit 0
42 }
43
44
45 cat /dev/null > $TEST_DIR/Logs/$RunDate.test.output \
46 || finish FAILURE "Could not create out_file $TEST_DIR/Logs/$RunDate.test.output"
47
48 # Save output in Logs/date.test.output
49 exec 1> $TEST_DIR/Logs/$RunDate.test.output 2>&1
50
51
52 cd $TEST_DIR || finish FAILURE "Could not cd to WorkDir $TEST_DIR"
53
54 test -d Logs || mkdir Logs
55
56 umask 022
57
58 test -d sandbox.$RunDate && finish FAILURE "Today's sandbox already exists"
59 mkdir sandbox.$RunDate || finish FAILURE "Could not mkdir sandbox"
60 cd sandbox.$RunDate || finish FAILURE "Could not cd to sandbox"
61
62 # Load modules
63 . /usr/share/modules/init/sh
64 module load escript/current
65 module load subversion-1.3.1
66 module load pbs
67
68 echo "Checking out esys13/trunk"
69 svn checkout svn+ssh://shake200.esscc.uq.edu.au/home/www_svn/repos/esys13/trunk >> $TEST_DIR/Logs/$RunDate.test.output 2>&1 \
70 || finish FAILURE "Could not check out esys13/trunk"
71
72 export LD_LIBRARY_PATH="$TEST_DIR/lib:$LD_LIBRARY_PATH"
73 export PYTHONPATH="$TEST_DIR:$PYTHONPATH"
74
75 # How many threads? One per CPU.
76 export OMP_NUM_THREADS=1
77
78 # Run the tests
79 echo "Running the tests $TEST_NAME"
80 cd trunk || finish FAILURE "Could not cd to trunk"
81 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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26