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