author | wenzelm |
Fri, 19 Jan 2007 22:08:31 +0100 | |
changeset 22122 | 58f846cc5c3d |
parent 21574 | 659d4509b96f |
permissions | -rwxr-xr-x |
13231 | 1 |
#!/usr/bin/env bash |
2 |
# |
|
3 |
# $Id$ |
|
4 |
# Author: Gerwin Klein, TU Muenchen |
|
5 |
# |
|
6 |
# DESCRIPTION: Build distribution and run isatest-make for lots of platforms. |
|
7 |
||
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 | 10 |
|
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 | 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 | 16 |
TAR=gtar |
17578 | 17 |
CVS2CL="$HOME/bin/cvs2cl --follow-only TRUNK" |
13231 | 18 |
|
13233 | 19 |
SSH="ssh -f" |
13231 | 20 |
|
21 |
## diagnostics |
|
22 |
||
23 |
PRG="$(basename "$0")" |
|
24 |
||
25 |
function usage() |
|
26 |
{ |
|
27 |
echo |
|
28 |
echo "Usage: $PRG" |
|
29 |
echo |
|
30 |
echo " Build distribution and run isatest-make for lots of platforms." |
|
31 |
echo |
|
32 |
exit 1 |
|
33 |
} |
|
34 |
||
35 |
function fail() |
|
36 |
{ |
|
37 |
echo "$1" >&2 |
|
38 |
exit 2 |
|
39 |
} |
|
40 |
||
41 |
## main |
|
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 | 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 | 48 |
export DISTPREFIX |
15438 | 49 |
export CVS2CL |
13231 | 50 |
|
13431
b0ba3b3573e1
changed date format for proper lexicographical ordering
isatest
parents:
13359
diff
changeset
|
51 |
DATE=$(date "+%Y-%m-%d") |
13231 | 52 |
DISTLOG=$LOGPREFIX/isatest-makedist-$DATE.log |
53 |
||
54 |
echo ------------------- preparing test release --- `date` --- $HOSTNAME > $DISTLOG 2>&1 |
|
55 |
||
56 |
echo "### cleaning up old dist directory" >> $DISTLOG 2>&1 |
|
57 |
rm -rf $DISTPREFIX >> $DISTLOG 2>&1 |
|
58 |
||
13237 | 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 | 61 |
|
13231 | 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 | 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 |
14037 | 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 |
|
87 |
echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1 |
|
13237 | 88 |
|
89 |
ELAPSED=$("$HOME/bin/showtime" "$SECONDS") |
|
90 |
echo "$(date) $HOSTNAME $PRG: dist build successful, elapsed time $ELAPSED." >> $MASTERLOG |
|
91 |
||
13231 | 92 |
|
93 |
## spawn test runs |
|
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 | 96 |
# give test some time to copy settings and start |
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 | 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 | 103 |
sleep 5 |
16618 | 104 |
$SSH macbroy5 "$MAKEALL $HOME/settings/mac-poly $HOME/settings/mac-sml-dev" |
21040 | 105 |
sleep 5 |
21047 | 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 | 111 |
|
13234 | 112 |
## end |