Admin/isatest-makedist
author isatest
Thu Jun 20 22:30:00 2002 +0200 (2002-06-20)
changeset 13234 8139edae3bf5
parent 13233 5ab7bac534c9
child 13237 493d61afa731
permissions -rwxr-xr-x
tuned
     1 #!/usr/bin/env bash
     2 #
     3 # $Id$
     4 # Author: Gerwin Klein, TU Muenchen
     5 # License: GPL (GNU GENERAL PUBLIC LICENSE)
     6 #
     7 # DESCRIPTION: Build distribution and run isatest-make for lots of platforms.
     8 
     9 ## global settings
    10 LOGPREFIX=~/log
    11 DISTPREFIX=~/isadist
    12 MAKEDIST=~/bin/makedist
    13 MAKEALL=~/bin/isatest-makeall
    14 TAR=gtar
    15 
    16 SUN=sunbroy2
    17 AT=atbroy37
    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 export DISTPREFIX
    44 
    45 DATE=$(date "+%d-%b-%Y")
    46 DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log
    47 
    48 echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1
    49 
    50 echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
    51 rm -rf $DISTPREFIX >> $DISTLOG 2>&1
    52 
    53 echo "### building distribution"  >> $DISTLOG 2>&1
    54 $MAKEDIST - >> $DISTLOG 2>&1
    55 
    56 if [ $? -ne 0 ]
    57 then
    58     echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    59     # more action here
    60     exit 1
    61 fi
    62 
    63 cd $DISTPREFIX >> $DISTLOG 2>&1
    64 $TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
    65 
    66 echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    67 
    68 ## spawn test runs
    69 
    70 # run tests in parallel on multiprocessor sun 
    71 $SSH $SUN "$MAKEALL $DISTPREFIX ~/settings/sun-poly"
    72 $SSH $SUN "$MAKEALL $DISTPREFIX ~/settings/sun-sml"
    73 
    74 # run tests sequentially on x86
    75 $SSH $AT "$MAKEALL $DISTPREFIX ~/settings/at-poly ~/settings/at-sml"
    76 
    77 ## end