Admin/isatest/isatest-makedist
author wenzelm
Sat, 13 Jun 2009 19:13:27 +0200
changeset 31615 0b807e04f1f8
parent 31583 02ab6fdd200c
child 31652 e3fc3f4b797f
permissions -rwxr-xr-x
moved at-mac-poly-5.1-para back to macbroy6, for continous performance figures;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     1
#!/usr/bin/env bash
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     2
#
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     3
# Author: Gerwin Klein, TU Muenchen
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     4
#
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     5
# DESCRIPTION: Build distribution and run isatest-make for lots of platforms.
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     6
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     7
## global settings
22411
1956d895a4ed adjust paths
kleing
parents: 22410
diff changeset
     8
. ~/admin/isatest/isatest-settings
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     9
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    10
TMP=/tmp/isatest-makedist.$$
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    11
MAIL=$HOME/bin/pmail
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    12
28931
498b63ba782c renamed makedist_mercurial to makedist, deleting the old version;
wenzelm
parents: 28607
diff changeset
    13
MAKEDIST=$HOME/bin/makedist
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    14
MAKEALL=$HOME/bin/isatest-makeall
27084
654bf12de98b switch from gtar to tar
isatest
parents: 26727
diff changeset
    15
TAR=tar
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    16
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    17
SSH="ssh -f"
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    18
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    19
## diagnostics
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    20
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    21
PRG="$(basename "$0")"
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    22
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    23
function usage()
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    24
{
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    25
  echo
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    26
  echo "Usage: $PRG"
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    27
  echo
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    28
  echo "   Build distribution and run isatest-make for lots of platforms."
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    29
  echo
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    30
  exit 1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    31
}
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    32
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    33
function fail()
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    34
{
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    35
  echo "$1" >&2
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    36
  exit 2
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    37
}
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    38
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    39
## main
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    40
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    41
# cleanup old error log and test-still-running files
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    42
rm -f $ERRORLOG
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    43
rm -f $ERRORDIR/isatest-*.log
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    44
rm -f $RUNNING/*.runnning
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    45
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    46
export DISTPREFIX
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    47
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    48
DATE=$(date "+%Y-%m-%d")
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    49
DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    50
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    51
echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    52
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    53
echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    54
rm -rf $DISTPREFIX >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    55
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    56
echo "### cleaning up old isabelle-* directories" >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    57
rm -rf $HOME/isabelle-*
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    58
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    59
echo "### building distribution"  >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    60
mkdir -p $DISTPREFIX
28418
4ffb62675ade slightly different command line for makedist_mercurial
kleing
parents: 28387
diff changeset
    61
$MAKEDIST >> $DISTLOG 2>&1
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    62
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    63
if [ $? -ne 0 ]
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    64
then
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    65
    echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    66
    ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
28539
bdb308737bfd do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents: 28418
diff changeset
    67
    log "dist build FAILED, elapsed time $ELAPSED."
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    68
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    69
    echo "Could not build isabelle distribution. Log file available at" > $TMP
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    70
    echo "$HOSTNAME:$DISTLOG" >> $TMP
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    71
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    72
    for R in $MAILTO; do
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    73
        $MAIL "isabelle dist build failed" $R $TMP
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    74
    done
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    75
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    76
    rm $TMP
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    77
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    78
    exit 1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    79
fi
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    80
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    81
cd $DISTPREFIX >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    82
$TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    83
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    84
echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    85
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    86
ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
28539
bdb308737bfd do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents: 28418
diff changeset
    87
log "dist build successful, elapsed time $ELAPSED."
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    88
22413
3df5c44482e2 clean up var/running dir before spawning new tests
kleing
parents: 22411
diff changeset
    89
## clean up var/running
3df5c44482e2 clean up var/running dir before spawning new tests
kleing
parents: 22411
diff changeset
    90
rm -f $RUNNING/*
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    91
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    92
## spawn test runs
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    93
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    94
$SSH sunbroy2 "$MAKEALL $HOME/settings/sun-poly"
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    95
# give test some time to copy settings and start
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
    96
sleep 15
26727
b0d3e33c5093 move some at/a64 tests to intel mac hardware (running Linux)
isatest
parents: 25912
diff changeset
    97
$SSH macbroy21 "$MAKEALL $HOME/settings/at-poly"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
    98
sleep 15
26727
b0d3e33c5093 move some at/a64 tests to intel mac hardware (running Linux)
isatest
parents: 25912
diff changeset
    99
$SSH macbroy20 "$MAKEALL $HOME/settings/at-poly-5.1-para-e"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
   100
sleep 15
27539
115d3a8bc6a6 temporarily disable at-sml-dev-p
kleing
parents: 27489
diff changeset
   101
#$SSH macbroy24 "$MAKEALL -l HOL proofterms $HOME/settings/at-sml-dev-p"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
   102
#sleep 15
26727
b0d3e33c5093 move some at/a64 tests to intel mac hardware (running Linux)
isatest
parents: 25912
diff changeset
   103
$SSH macbroy22 "$MAKEALL $HOME/settings/at64-poly-5.1-para"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
   104
sleep 15
31385
bc1f918ccf68 switch at-sml-dev-e back to full test on macbroy23
kleing
parents: 28931
diff changeset
   105
$SSH macbroy23 "$MAKEALL $HOME/settings/at-sml-dev-e"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
   106
sleep 15
25532
27f6771ae8fb switch poly to 5.1, removed -e flag from most sessions
kleing
parents: 24758
diff changeset
   107
$SSH atbroy101 "$MAKEALL $HOME/settings/at64-poly"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
   108
sleep 15
31615
0b807e04f1f8 moved at-mac-poly-5.1-para back to macbroy6, for continous performance figures;
wenzelm
parents: 31583
diff changeset
   109
$SSH macbroy2 "$MAKEALL $HOME/settings/mac-poly-M4; $MAKEALL $HOME/settings/mac-poly-M8"
31581
907616b9536c more isatests;
wenzelm
parents: 31385
diff changeset
   110
sleep 15
27488
9771f949bd84 retired mac-sml-dev.
kleing
parents: 27308
diff changeset
   111
$SSH macbroy5 "$MAKEALL $HOME/settings/mac-poly"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
   112
sleep 15
31615
0b807e04f1f8 moved at-mac-poly-5.1-para back to macbroy6, for continous performance figures;
wenzelm
parents: 31583
diff changeset
   113
$SSH macbroy6 "$MAKEALL $HOME/settings/at-mac-poly-5.1-para"
28598
cb5f98e2e187 give more time to do inital loggin and settings read
kleing
parents: 28539
diff changeset
   114
sleep 15
22640
f3a6c9389e7b run annomaly from makedist
kleing
parents: 22413
diff changeset
   115
$SSH atbroy51 "$HOME/admin/isatest/isatest-annomaly"
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   116
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   117
echo ------------------- spawned tests successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   118
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   119
gzip -f $DISTLOG
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   120
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   121
## end