Admin/isatest-makedist
changeset 13231 cce28efb2600
child 13233 5ab7bac534c9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Admin/isatest-makedist	Thu Jun 20 21:45:14 2002 +0200
     1.3 @@ -0,0 +1,78 @@
     1.4 +#!/usr/bin/env bash
     1.5 +#
     1.6 +# $Id$
     1.7 +# Author: Gerwin Klein, TU Muenchen
     1.8 +# License: GPL (GNU GENERAL PUBLIC LICENSE)
     1.9 +#
    1.10 +# DESCRIPTION: Build distribution and run isatest-make for lots of platforms.
    1.11 +
    1.12 +## global settings
    1.13 +LOGPREFIX=~
    1.14 +DISTPREFIX=~/isadist
    1.15 +MAKEDIST=~/bin/makedist
    1.16 +
    1.17 +SUN=sunbroy2
    1.18 +AT=atbroy37
    1.19 +
    1.20 +SSH="ssh -1 -f"
    1.21 +
    1.22 +## diagnostics
    1.23 +
    1.24 +PRG="$(basename "$0")"
    1.25 +
    1.26 +function usage()
    1.27 +{
    1.28 +  echo
    1.29 +  echo "Usage: $PRG"
    1.30 +  echo
    1.31 +  echo "   Build distribution and run isatest-make for lots of platforms."
    1.32 +  echo
    1.33 +  exit 1
    1.34 +}
    1.35 +
    1.36 +function fail()
    1.37 +{
    1.38 +  echo "$1" >&2
    1.39 +  exit 2
    1.40 +}
    1.41 +
    1.42 +## main
    1.43 +
    1.44 +export DISTPREFIX
    1.45 +
    1.46 +DATE=$(date "+%d-%b-%Y")
    1.47 +DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log
    1.48 +
    1.49 +# get newest version of makedist:
    1.50 +# cvs -d sunbroy2:/usr/proj/isabelle-repository/archive co isabelle/Admin > $COUTLOG
    1.51 +
    1.52 +echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1
    1.53 +
    1.54 +echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
    1.55 +rm -rf $DISTPREFIX >> $DISTLOG 2>&1
    1.56 +
    1.57 +echo "### building distribution"  >> $DISTLOG 2>&1
    1.58 +$MAKEDIST - >> $DISTLOG 2>&1
    1.59 +
    1.60 +if [ $? -ne 0 ]
    1.61 +then
    1.62 +    echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    1.63 +    # more action here
    1.64 +    exit 1
    1.65 +fi
    1.66 +
    1.67 +cd $DISTPREFIX >> $DISTLOG 2>&1
    1.68 +tar xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
    1.69 +
    1.70 +echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    1.71 +
    1.72 +## spawn test runs
    1.73 +
    1.74 +# run tests in parallel on multiprocessor sun 
    1.75 +$SSH $SUN sun-poly   
    1.76 +$SSH $SUN sun-sml
    1.77 +
    1.78 +# run tests sequentially on x86
    1.79 +$SSH $AT at-poly at-sml
    1.80 +
    1.81 +## end
    1.82 \ No newline at end of file