author | kleing |
Mon, 05 May 2003 15:55:56 +0200 | |
changeset 13955 | 8ab1d3e73bb1 |
parent 13900 | 0cfdeb44621e |
child 13962 | 908f6776a59b |
permissions | -rwxr-xr-x |
13231 | 1 |
#!/usr/bin/env bash |
2 |
# |
|
3 |
# $Id$ |
|
4 |
# Author: Gerwin Klein, TU Muenchen |
|
5 |
# License: GPL (GNU GENERAL PUBLIC LICENSE) |
|
6 |
# |
|
7 |
# DESCRIPTION: Build distribution and run isatest-make for lots of platforms. |
|
8 |
||
13237 | 9 |
# source bashrc, we're called by cron |
10 |
. ~/.bashrc |
|
11 |
||
12 |
||
13231 | 13 |
## global settings |
13680
a6ce43a59d4a
switched to atbroy51, removed markus from email list
isatest
parents:
13431
diff
changeset
|
14 |
MAILTO="kleing@in.tum.de nipkow@in.tum.de berghofe@in.tum.de schirmer@in.tum.de lp15@cam.ac.uk" |
13359 | 15 |
|
16 |
TMP=/tmp/isatest-makedist.$$ |
|
17 |
MAIL=~/bin/pmail |
|
13246 | 18 |
|
13233 | 19 |
LOGPREFIX=~/log |
13237 | 20 |
MASTERLOG=$LOGPREFIX/isatest.log |
13231 | 21 |
DISTPREFIX=~/isadist |
22 |
MAKEDIST=~/bin/makedist |
|
13234 | 23 |
MAKEALL=~/bin/isatest-makeall |
24 |
TAR=gtar |
|
13231 | 25 |
|
13233 | 26 |
SSH="ssh -f" |
13231 | 27 |
|
28 |
## diagnostics |
|
29 |
||
30 |
PRG="$(basename "$0")" |
|
31 |
||
32 |
function usage() |
|
33 |
{ |
|
34 |
echo |
|
35 |
echo "Usage: $PRG" |
|
36 |
echo |
|
37 |
echo " Build distribution and run isatest-make for lots of platforms." |
|
38 |
echo |
|
39 |
exit 1 |
|
40 |
} |
|
41 |
||
42 |
function fail() |
|
43 |
{ |
|
44 |
echo "$1" >&2 |
|
45 |
exit 2 |
|
46 |
} |
|
47 |
||
48 |
## main |
|
49 |
||
50 |
export DISTPREFIX |
|
51 |
||
13431
b0ba3b3573e1
changed date format for proper lexicographical ordering
isatest
parents:
13359
diff
changeset
|
52 |
DATE=$(date "+%Y-%m-%d") |
13231 | 53 |
DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log |
54 |
||
55 |
echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1 |
|
56 |
||
57 |
echo "### cleaning up old dist directory" >> $DISTLOG 2>&1 |
|
58 |
rm -rf $DISTPREFIX >> $DISTLOG 2>&1 |
|
59 |
||
13237 | 60 |
echo "### cleaning up old isabelle-* directories" >> $DISTLOG 2>&1 |
61 |
rm -rf ~/isabelle-* |
|
62 |
||
13231 | 63 |
echo "### building distribution" >> $DISTLOG 2>&1 |
64 |
$MAKEDIST - >> $DISTLOG 2>&1 |
|
65 |
||
66 |
if [ $? -ne 0 ] |
|
67 |
then |
|
68 |
echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1 |
|
13237 | 69 |
ELAPSED=$("$HOME/bin/showtime" "$SECONDS") |
70 |
echo "$(date) $HOSTNAME $PRG: dist build FAILED, elapsed time $ELAPSED." >> $MASTERLOG |
|
13246 | 71 |
|
13359 | 72 |
echo "Could not build isabelle distribution. Log file available at" > $TMP |
73 |
echo "$HOSTNAME:$DISTLOG" >> $TMP |
|
13246 | 74 |
|
13359 | 75 |
for R in $MAILTO; do |
76 |
$MAIL "isabelle dist build failed" $R $TMP |
|
13246 | 77 |
done |
78 |
||
13359 | 79 |
rm $TMP |
80 |
||
13231 | 81 |
exit 1 |
82 |
fi |
|
83 |
||
84 |
cd $DISTPREFIX >> $DISTLOG 2>&1 |
|
13234 | 85 |
$TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1 |
13231 | 86 |
|
13839 | 87 |
echo "### generating development snapshot web page" >> $DISTLOG 2>&1 |
88 |
(cd ~/devel-page; make) |
|
89 |
||
13231 | 90 |
echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1 |
13237 | 91 |
gzip -f $DISTLOG |
92 |
||
93 |
ELAPSED=$("$HOME/bin/showtime" "$SECONDS") |
|
94 |
echo "$(date) $HOSTNAME $PRG: dist build successful, elapsed time $ELAPSED." >> $MASTERLOG |
|
95 |
||
13231 | 96 |
|
97 |
## spawn test runs |
|
98 |
||
13955 | 99 |
$SSH sunbroy2 "$MAKEALL $DISTPREFIX ~/settings/sun-poly ~/settings/sun-sml" |
100 |
$SSH atbroy51 "$MAKEALL $DISTPREFIX ~/settings/at-poly ~/settings/at-sml" |
|
101 |
$SSH macbroy33 "$MAKEALL $DISTPREFIX ~/settings/mac-poly" |
|
13231 | 102 |
|
13234 | 103 |
## end |