Admin/isatest/isatest-makedist
author wenzelm
Fri Jun 12 20:20:41 2009 +0200 (2009-06-12)
changeset 31581 907616b9536c
parent 31385 bc1f918ccf68
child 31582 4753c317d5c1
permissions -rwxr-xr-x
more isatests;
macbroy23: nice at-sml-dev-e;
     1 #!/usr/bin/env bash
     2 #
     3 # $Id$
     4 # Author: Gerwin Klein, TU Muenchen
     5 #
     6 # DESCRIPTION: Build distribution and run isatest-make for lots of platforms.
     7 
     8 ## global settings
     9 . ~/admin/isatest/isatest-settings
    10 
    11 TMP=/tmp/isatest-makedist.$$
    12 MAIL=$HOME/bin/pmail
    13 
    14 MAKEDIST=$HOME/bin/makedist
    15 MAKEALL=$HOME/bin/isatest-makeall
    16 TAR=tar
    17 CVS2CL="$HOME/bin/cvs2cl --follow-only TRUNK"
    18 
    19 SSH="ssh -f"
    20 
    21 ## diagnostics
    22 
    23 PRG="$(basename "$0")"
    24 
    25 function usage()
    26 {
    27   echo
    28   echo "Usage: $PRG"
    29   echo
    30   echo "   Build distribution and run isatest-make for lots of platforms."
    31   echo
    32   exit 1
    33 }
    34 
    35 function fail()
    36 {
    37   echo "$1" >&2
    38   exit 2
    39 }
    40 
    41 ## main
    42 
    43 # cleanup old error log and test-still-running files
    44 rm -f $ERRORLOG
    45 rm -f $ERRORDIR/isatest-*.log
    46 rm -f $RUNNING/*.runnning
    47 
    48 export DISTPREFIX
    49 export CVS2CL
    50 
    51 DATE=$(date "+%Y-%m-%d")
    52 DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log
    53 
    54 echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1
    55 
    56 echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
    57 rm -rf $DISTPREFIX >> $DISTLOG 2>&1
    58 
    59 echo "### cleaning up old isabelle-* directories" >> $DISTLOG 2>&1
    60 rm -rf $HOME/isabelle-*
    61 
    62 echo "### building distribution"  >> $DISTLOG 2>&1
    63 mkdir -p $DISTPREFIX
    64 $MAKEDIST >> $DISTLOG 2>&1
    65 
    66 if [ $? -ne 0 ]
    67 then
    68     echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    69     ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
    70     log "dist build FAILED, elapsed time $ELAPSED."
    71 
    72     echo "Could not build isabelle distribution. Log file available at" > $TMP
    73     echo "$HOSTNAME:$DISTLOG" >> $TMP
    74 
    75     for R in $MAILTO; do
    76         $MAIL "isabelle dist build failed" $R $TMP
    77     done
    78 
    79     rm $TMP
    80 
    81     exit 1
    82 fi
    83 
    84 cd $DISTPREFIX >> $DISTLOG 2>&1
    85 $TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
    86 
    87 echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    88 
    89 ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
    90 log "dist build successful, elapsed time $ELAPSED."
    91 
    92 ## clean up var/running
    93 rm -f $RUNNING/*
    94 
    95 ## spawn test runs
    96 
    97 $SSH sunbroy2 "$MAKEALL $HOME/settings/sun-poly"
    98 # give test some time to copy settings and start
    99 sleep 15
   100 $SSH macbroy21 "$MAKEALL $HOME/settings/at-poly"
   101 sleep 15
   102 $SSH macbroy20 "$MAKEALL $HOME/settings/at-poly-5.1-para-e"
   103 sleep 15
   104 #$SSH macbroy24 "$MAKEALL -l HOL proofterms $HOME/settings/at-sml-dev-p"
   105 #sleep 15
   106 $SSH macbroy22 "$MAKEALL $HOME/settings/at64-poly-5.1-para"
   107 sleep 15
   108 $SSH macbroy23 "$MAKEALL $HOME/settings/at-sml-dev-e"
   109 sleep 15
   110 $SSH atbroy101 "$MAKEALL $HOME/settings/at64-poly"
   111 sleep 15
   112 $SSH macbroy2 "$MAKEALL $HOME/settings/at-mac-poly-5.1-para; $MAKEALL $HOME/settings/mac-poly-M8"
   113 sleep 15
   114 $SSH macbroy5 "$MAKEALL $HOME/settings/mac-poly"
   115 sleep 15
   116 $SSH macbroy6 "$MAKEALL $HOME/settings/mac-poly-M4"
   117 sleep 15
   118 $SSH atbroy51 "$HOME/admin/isatest/isatest-annomaly"
   119 
   120 echo ------------------- spawned tests successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
   121 
   122 gzip -f $DISTLOG
   123 
   124 ## end