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