Admin/isatest-makedist
author wenzelm
Fri, 19 Jan 2007 22:08:31 +0100
changeset 22122 58f846cc5c3d
parent 21574 659d4509b96f
permissions -rwxr-xr-x
results: proper context;
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
17578
e07af5fad73f only show trunk in Changelog (kleing)
isatest
parents: 16618
diff changeset
    17
CVS2CL="$HOME/bin/cvs2cl --follow-only TRUNK"
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
20019
283dfd5bd36b make sure $DISTPREFIX exists before calling makedist
kleing
parents: 18889
diff changeset
    63
mkdir -p $DISTPREFIX
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    64
$MAKEDIST - >> $DISTLOG 2>&1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    65
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    66
if [ $? -ne 0 ]
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    67
then
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    68
    echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
13237
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    69
    ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    70
    echo "$(date) $HOSTNAME $PRG: dist build FAILED, elapsed time $ELAPSED." >> $MASTERLOG
13246
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    71
13359
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    72
    echo "Could not build isabelle distribution. Log file available at" > $TMP
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    73
    echo "$HOSTNAME:$DISTLOG" >> $TMP
13246
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    74
13359
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    75
    for R in $MAILTO; do
14037
3b7f3eec9684 more cleanup
kleing
parents: 14032
diff changeset
    76
        $MAIL "isabelle dist build failed" $R $TMP
13246
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    77
    done
e51efc2029e9 email sending
isatest
parents: 13237
diff changeset
    78
13359
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    79
    rm $TMP
982827aacb39 mail address update
isatest
parents: 13246
diff changeset
    80
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    81
    exit 1
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    82
fi
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    83
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    84
cd $DISTPREFIX >> $DISTLOG 2>&1
13234
isatest
parents: 13233
diff changeset
    85
$TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    86
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    87
echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
13237
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    88
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    89
ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    90
echo "$(date) $HOSTNAME $PRG: dist build successful, elapsed time $ELAPSED." >> $MASTERLOG
493d61afa731 cleanup old isabelle-* dirs before test start
isatest
parents: 13234
diff changeset
    91
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    92
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    93
## spawn test runs
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
    94
21424
5295ffa18285 start at-sml earlier and on different machine, remove sun-sml test (takes too long)
kleing
parents: 21347
diff changeset
    95
$SSH sunbroy2 "$MAKEALL $HOME/settings/sun-poly"
14032
a6239314e380 give tests time to copy settings
kleing
parents: 13993
diff changeset
    96
# give test some time to copy settings and start
a6239314e380 give tests time to copy settings
kleing
parents: 13993
diff changeset
    97
sleep 5
21574
659d4509b96f go back to fixed atbroy51, fix at-poly-e path settings
isatest
parents: 21429
diff changeset
    98
$SSH atbroy51 "$MAKEALL $HOME/settings/at-poly $HOME/settings/at-poly-e"
21424
5295ffa18285 start at-sml earlier and on different machine, remove sun-sml test (takes too long)
kleing
parents: 21347
diff changeset
    99
sleep 5
5295ffa18285 start at-sml earlier and on different machine, remove sun-sml test (takes too long)
kleing
parents: 21347
diff changeset
   100
$SSH atbroy10 "$MAKEALL $HOME/settings/at-sml-dev"
14032
a6239314e380 give tests time to copy settings
kleing
parents: 13993
diff changeset
   101
sleep 5
21039
41d61de086bb add experimental at64 poly-4.9.1 test on atbroy101
isatest
parents: 20339
diff changeset
   102
$SSH atbroy101 "$MAKEALL $HOME/settings/at64-poly-e"
18889
da6e27ee69e5 add 64bit atbroy98 platform
kleing
parents: 17578
diff changeset
   103
sleep 5
16618
27b62ff6f452 test sml-dev on mac as well
kleing
parents: 16566
diff changeset
   104
$SSH macbroy5 "$MAKEALL $HOME/settings/mac-poly $HOME/settings/mac-sml-dev"
21040
983caf913a4c add experimental macbroy6 (intel-darwin)
isatest
parents: 21039
diff changeset
   105
sleep 5
21047
0cf1800ff7cf macbroy6 still has non-standard setup
kleing
parents: 21040
diff changeset
   106
$SSH macbroy6 "/usr/stud/isatest/bin/isatest-makeall $HOME/settings/at-mac-poly-e"
16095
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   107
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   108
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
   109
f6af6b265d20 put global isatest settings in one file, sourced by the other scripts
kleing
parents: 16043
diff changeset
   110
gzip -f $DISTLOG
13231
cce28efb2600 for nightly test builds
kleing
parents:
diff changeset
   111
13234
isatest
parents: 13233
diff changeset
   112
## end