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