Admin/isatest-makedist
author kleing
Thu Jun 20 22:17:28 2002 +0200 (2002-06-20)
changeset 13233 5ab7bac534c9
parent 13231 cce28efb2600
child 13234 8139edae3bf5
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 
    14 SUN=sunbroy2
    15 AT=atbroy37
    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 export DISTPREFIX
    42 
    43 DATE=$(date "+%d-%b-%Y")
    44 DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log
    45 
    46 echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1
    47 
    48 echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
    49 rm -rf $DISTPREFIX >> $DISTLOG 2>&1
    50 
    51 echo "### building distribution"  >> $DISTLOG 2>&1
    52 $MAKEDIST - >> $DISTLOG 2>&1
    53 
    54 if [ $? -ne 0 ]
    55 then
    56     echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    57     # more action here
    58     exit 1
    59 fi
    60 
    61 cd $DISTPREFIX >> $DISTLOG 2>&1
    62 tar xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
    63 
    64 echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    65 
    66 ## spawn test runs
    67 
    68 # run tests in parallel on multiprocessor sun 
    69 $SSH $SUN "$MAKEDIST $DISTPREFIX ~/settings/sun-poly"
    70 $SSH $SUN "$MAKEDIST $DISTPREFIX ~/settings/sun-sml"
    71 
    72 # run tests sequentially on x86
    73 $SSH $AT "$MAKEDIST $DISTPREFIX ~/settings/at-poly ~/settings/at-sml"
    74 
    75 ## end