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

revision 774 by ksteube, Mon Jul 10 02:00:55 2006 UTC revision 979 by ksteube, Sun Feb 18 23:24:47 2007 UTC
# Line 19  test "x$1" != "x" && target="$1" Line 19  test "x$1" != "x" && target="$1"
19  requested_cpus=2  requested_cpus=2
20  test "x$target" = "xall_tests" && requested_cpus=4  test "x$target" = "xall_tests" && requested_cpus=4
21    
22  # MAIL_RECIPIENTS="l.gross@uq.edu.au elspeth@esscc.uq.edu.au matt@esscc.uq.edu.au robert.woodcock@csiro.au Peter.Hornby@csiro.au k.steube@uq.edu.au"  MAIL_RECIPIENTS="l.gross@uq.edu.au matt@esscc.uq.edu.au robert.woodcock@csiro.au Peter.Hornby@csiro.au k.steube@uq.edu.au"
23  MAIL_RECIPIENTS="k.steube@uq.edu.au"  # MAIL_RECIPIENTS="k.steube@uq.edu.au"
24    
25    # This time is when the job was submitted. If it waits in the queue it might run on another day.
26    # This date is also used to create the sandbox directory where the tests are run.
27  RunDate=`date '+%Y_%m_%d'`  # Time stamp for log file names  RunDate=`date '+%Y_%m_%d'`  # Time stamp for log file names
28    
29  WorkDir=/raid3/ksteube/AutoTests  WorkDir=/raid3/ksteube/AutoTests
# Line 40  SCRIPT_NAME=$0 Line 42  SCRIPT_NAME=$0
42  cat << EOF > Logs/$RunDate.pbs.script.sh  cat << EOF > Logs/$RunDate.pbs.script.sh
43  #!/bin/bash  #!/bin/bash
44    
45  #PBS -q q1  #PBS -q q80
46  #PBS -N autotest  #PBS -N autotest
47  #PBS -l ncpus=$requested_cpus  #PBS -l ncpus=$requested_cpus
48  #PBS -o $RunDate.pbs.stdout  #PBS -o $RunDate.pbs.stdout
# Line 64  echo "" Line 66  echo ""
66  START=\`date '+%Y/%m/%d %H:%M'\`  START=\`date '+%Y/%m/%d %H:%M'\`
67    
68  finish () {  finish () {
69      # state will be 'FAILURE' or 'SUCCESS'
70      state="\$1"
71    date    date
72    # Clean up the sandbox    # Clean up the sandbox
73    cd $WorkDir    cd $WorkDir
74    /bin/rm -rf sandbox.$RunDate    /bin/rm -rf sandbox.$RunDate
75    END=\`date '+%Y/%m/%d %H:%M'\`    END=\`date '+%Y/%m/%d %H:%M'\`
76    cat << END_MSG | mail -s "ESYS_TESTS $target $RunDate \$1" $MAIL_RECIPIENTS    cat << END_MSG | mail -s "ESYS_TESTS $target $RunDate \$state" $MAIL_RECIPIENTS
77  \$2.  \$2.
78  The tests ran from \$START to \$END on \$NCPUS CPUs  The tests ran from \$START to \$END on \$NCPUS CPUs
79  See the log files in $WorkDir/Logs/$RunDate*  See the log files in $WorkDir/Logs/$RunDate*
80  This mail was sent by $SCRIPT_NAME  This mail was sent by $SCRIPT_NAME
81  running as \$USER on \`hostname\`.  running as \$USER on \`hostname\`.
82  END_MSG  END_MSG
83    test "x\$1" = "FAILURE" && exit 1    if [ "x\$state" = "xFAILURE" ]; then
84        touch Logs/$RunDate.FAILURE
85        exit 1
86      fi
87    exit 0    exit 0
88  }  }
89    
# Line 114  scons -j \$NCPUS $target >> $out_file 2> Line 121  scons -j \$NCPUS $target >> $out_file 2>
121    
122  echo "Cleaning up after the tests"  echo "Cleaning up after the tests"
123    
124  # Delete files older than 21 days  # Delete files older than 60 days
125  find $WorkDir -atime +21 -exec rm -f {} \;  find $WorkDir -atime +60 -exec rm -f {} \;
126    
127  finish SUCCESS "Successfully ran 'scons $target' on \`hostname\`"  finish SUCCESS "Successfully ran 'scons $target' on \`hostname\`"
128    
# Line 127  cd $WorkDir/Logs Line 134  cd $WorkDir/Logs
134  # Submit the job  # Submit the job
135  . /opt/modules/default/init/sh  . /opt/modules/default/init/sh
136  module load pbspro  module load pbspro
137    
138    # Submit the job
139  qsub -S /bin/bash $RunDate.pbs.script.sh > /dev/null  qsub -S /bin/bash $RunDate.pbs.script.sh > /dev/null
140    

Legend:
Removed from v.774  
changed lines
  Added in v.979

  ViewVC Help
Powered by ViewVC 1.1.26