Admin/isatest-makedist
author obua
Fri, 16 Sep 2005 21:02:15 +0200
changeset 17440 df77edc4f5d0
parent 16618 27b62ff6f452
child 17578 e07af5fad73f
permissions -rwxr-xr-x
fixed HOL-light/Isabelle syntax incompatability via more protect_xxx functions
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
#
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
     6
# DESCRIPTION: Build distribution and run isatest-make for lots of platforms.
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
     7
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
     8
## global settings
16095
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
     9
. ~/admin/isatest-settings
13359
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    10
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    11
TMP=/tmp/isatest-makedist.$$
13962
908f6776a59b use /usr/stud/isatest as home for all platforms (macbroy33 has no /home/stud/..)
kleing
parents: 13955
diff changeset
    12
MAIL=$HOME/bin/pmail
13246
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    13
13962
908f6776a59b use /usr/stud/isatest as home for all platforms (macbroy33 has no /home/stud/..)
kleing
parents: 13955
diff changeset
    14
MAKEDIST=$HOME/bin/makedist
908f6776a59b use /usr/stud/isatest as home for all platforms (macbroy33 has no /home/stud/..)
kleing
parents: 13955
diff changeset
    15
MAKEALL=$HOME/bin/isatest-makeall
13234
isatest
parents: 13233
diff changeset
    16
TAR=gtar
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 14981
diff changeset
    17
CVS2CL=$HOME/bin/cvs2cl
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    18
13233
kleing
parents: 13231
diff changeset
    19
SSH="ssh -f"
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    20
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    21
## diagnostics
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    22
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    23
PRG="$(basename "$0")"
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    24
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    25
function usage()
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    26
{
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    27
  echo
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    28
  echo "Usage: $PRG"
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    29
  echo
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    30
  echo "   Build distribution and run isatest-make for lots of platforms."
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    31
  echo
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    32
  exit 1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    33
}
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    34
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    35
function fail()
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    36
{
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    37
  echo "$1" >&2
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    38
  exit 2
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    39
}
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    40
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    41
## main
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    42
13988
28c953b54cbe add cleanup of old error log and test-still-running files
kleing
parents: 13962
diff changeset
    43
# cleanup old error log and test-still-running files
28c953b54cbe add cleanup of old error log and test-still-running files
kleing
parents: 13962
diff changeset
    44
rm -f $ERRORLOG
14037
3b7f3eec9684 more cleanup
kleing
parents: 14032
diff changeset
    45
rm -f $ERRORDIR/isatest-*.log
13988
28c953b54cbe add cleanup of old error log and test-still-running files
kleing
parents: 13962
diff changeset
    46
rm -f $RUNNING/*.runnning
28c953b54cbe add cleanup of old error log and test-still-running files
kleing
parents: 13962
diff changeset
    47
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    48
export DISTPREFIX
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 14981
diff changeset
    49
export CVS2CL
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    50
13431
b0ba3b3573e1 changed date format for proper lexicographical ordering
isatest
parents: 13359
diff changeset
    51
DATE=$(date "+%Y-%m-%d")
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    52
DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    53
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    54
echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    55
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    56
echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    57
rm -rf $DISTPREFIX >> $DISTLOG 2>&1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    58
13237
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    59
echo "### cleaning up old isabelle-* directories" >> $DISTLOG 2>&1
13962
908f6776a59b use /usr/stud/isatest as home for all platforms (macbroy33 has no /home/stud/..)
kleing
parents: 13955
diff changeset
    60
rm -rf $HOME/isabelle-*
13237
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    61
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    62
echo "### building distribution"  >> $DISTLOG 2>&1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    63
$MAKEDIST - >> $DISTLOG 2>&1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    64
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    65
if [ $? -ne 0 ]
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    66
then
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    67
    echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
13237
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    68
    ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    69
    echo "$(date) $HOSTNAME $PRG: dist build FAILED, elapsed time $ELAPSED." >> $MASTERLOG
13246
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    70
13359
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    71
    echo "Could not build isabelle distribution. Log file available at" > $TMP
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    72
    echo "$HOSTNAME:$DISTLOG" >> $TMP
13246
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    73
13359
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    74
    for R in $MAILTO; do
14037
3b7f3eec9684 more cleanup
kleing
parents: 14032
diff changeset
    75
        $MAIL "isabelle dist build failed" $R $TMP
13246
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    76
    done
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    77
13359
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    78
    rm $TMP
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    79
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    80
    exit 1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    81
fi
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    82
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    83
cd $DISTPREFIX >> $DISTLOG 2>&1
13234
isatest
parents: 13233
diff changeset
    84
$TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    85
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    86
echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
13237
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    87
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    88
ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    89
echo "$(date) $HOSTNAME $PRG: dist build successful, elapsed time $ELAPSED." >> $MASTERLOG
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    90
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    91
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    92
## spawn test runs
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    93
16095
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
    94
$SSH sunbroy2 "$MAKEALL $HOME/settings/sun-poly $HOME/settings/sun-sml-dev"
14032
a6239314e380 give tests time to copy settings
kleing
parents: 13993
diff changeset
    95
# give test some time to copy settings and start
a6239314e380 give tests time to copy settings
kleing
parents: 13993
diff changeset
    96
sleep 5
16095
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
    97
$SSH atbroy51 "$MAKEALL $HOME/settings/at-poly $HOME/settings/at-sml-dev"
14032
a6239314e380 give tests time to copy settings
kleing
parents: 13993
diff changeset
    98
sleep 5
16618
27b62ff6f452 test sml-dev on mac as well
kleing
parents: 16566
diff changeset
    99
$SSH macbroy5 "$MAKEALL $HOME/settings/mac-poly $HOME/settings/mac-sml-dev"
16095
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   100
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   101
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   102
echo ------------------- spawned tests successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   103
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   104
gzip -f $DISTLOG
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
   105
13234
isatest
parents: 13233
diff changeset
   106
## end