Admin/isatest-makedist
author kleing
Thu Jun 20 21:45:14 2002 +0200 (2002-06-20)
changeset 13231 cce28efb2600
child 13233 5ab7bac534c9
permissions -rwxr-xr-x
for nightly test builds
kleing@13231
     1
#!/usr/bin/env bash
kleing@13231
     2
#
kleing@13231
     3
# $Id$
kleing@13231
     4
# Author: Gerwin Klein, TU Muenchen
kleing@13231
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
kleing@13231
     6
#
kleing@13231
     7
# DESCRIPTION: Build distribution and run isatest-make for lots of platforms.
kleing@13231
     8
kleing@13231
     9
## global settings
kleing@13231
    10
LOGPREFIX=~
kleing@13231
    11
DISTPREFIX=~/isadist
kleing@13231
    12
MAKEDIST=~/bin/makedist
kleing@13231
    13
kleing@13231
    14
SUN=sunbroy2
kleing@13231
    15
AT=atbroy37
kleing@13231
    16
kleing@13231
    17
SSH="ssh -1 -f"
kleing@13231
    18
kleing@13231
    19
## diagnostics
kleing@13231
    20
kleing@13231
    21
PRG="$(basename "$0")"
kleing@13231
    22
kleing@13231
    23
function usage()
kleing@13231
    24
{
kleing@13231
    25
  echo
kleing@13231
    26
  echo "Usage: $PRG"
kleing@13231
    27
  echo
kleing@13231
    28
  echo "   Build distribution and run isatest-make for lots of platforms."
kleing@13231
    29
  echo
kleing@13231
    30
  exit 1
kleing@13231
    31
}
kleing@13231
    32
kleing@13231
    33
function fail()
kleing@13231
    34
{
kleing@13231
    35
  echo "$1" >&2
kleing@13231
    36
  exit 2
kleing@13231
    37
}
kleing@13231
    38
kleing@13231
    39
## main
kleing@13231
    40
kleing@13231
    41
export DISTPREFIX
kleing@13231
    42
kleing@13231
    43
DATE=$(date "+%d-%b-%Y")
kleing@13231
    44
DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log
kleing@13231
    45
kleing@13231
    46
# get newest version of makedist:
kleing@13231
    47
# cvs -d sunbroy2:/usr/proj/isabelle-repository/archive co isabelle/Admin > $COUTLOG
kleing@13231
    48
kleing@13231
    49
echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1
kleing@13231
    50
kleing@13231
    51
echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
kleing@13231
    52
rm -rf $DISTPREFIX >> $DISTLOG 2>&1
kleing@13231
    53
kleing@13231
    54
echo "### building distribution"  >> $DISTLOG 2>&1
kleing@13231
    55
$MAKEDIST - >> $DISTLOG 2>&1
kleing@13231
    56
kleing@13231
    57
if [ $? -ne 0 ]
kleing@13231
    58
then
kleing@13231
    59
    echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
kleing@13231
    60
    # more action here
kleing@13231
    61
    exit 1
kleing@13231
    62
fi
kleing@13231
    63
kleing@13231
    64
cd $DISTPREFIX >> $DISTLOG 2>&1
kleing@13231
    65
tar xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
kleing@13231
    66
kleing@13231
    67
echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
kleing@13231
    68
kleing@13231
    69
## spawn test runs
kleing@13231
    70
kleing@13231
    71
# run tests in parallel on multiprocessor sun 
kleing@13231
    72
$SSH $SUN sun-poly   
kleing@13231
    73
$SSH $SUN sun-sml
kleing@13231
    74
kleing@13231
    75
# run tests sequentially on x86
kleing@13231
    76
$SSH $AT at-poly at-sml
kleing@13231
    77
kleing@13231
    78
## end