author | wenzelm |
Fri, 28 Oct 2005 22:27:41 +0200 | |
changeset 18020 | d23a846598d2 |
parent 17578 | e07af5fad73f |
child 18889 | da6e27ee69e5 |
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 |
63 |
$MAKEDIST - >> $DISTLOG 2>&1 |
|
64 |
||
65 |
if [ $? -ne 0 ] |
|
66 |
then |
|
67 |
echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1 |
|
13237 | 68 |
ELAPSED=$("$HOME/bin/showtime" "$SECONDS") |
69 |
echo "$(date) $HOSTNAME $PRG: dist build FAILED, elapsed time $ELAPSED." >> $MASTERLOG |
|
13246 | 70 |
|
13359 | 71 |
echo "Could not build isabelle distribution. Log file available at" > $TMP |
72 |
echo "$HOSTNAME:$DISTLOG" >> $TMP |
|
13246 | 73 |
|
13359 | 74 |
for R in $MAILTO; do |
14037 | 75 |
$MAIL "isabelle dist build failed" $R $TMP |
13246 | 76 |
done |
77 |
||
13359 | 78 |
rm $TMP |
79 |
||
13231 | 80 |
exit 1 |
81 |
fi |
|
82 |
||
83 |
cd $DISTPREFIX >> $DISTLOG 2>&1 |
|
13234 | 84 |
$TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1 |
13231 | 85 |
|
86 |
echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1 |
|
13237 | 87 |
|
88 |
ELAPSED=$("$HOME/bin/showtime" "$SECONDS") |
|
89 |
echo "$(date) $HOSTNAME $PRG: dist build successful, elapsed time $ELAPSED." >> $MASTERLOG |
|
90 |
||
13231 | 91 |
|
92 |
## spawn test runs |
|
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 | 95 |
# give test some time to copy settings and start |
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 | 98 |
sleep 5 |
16618 | 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 | 105 |
|
13234 | 106 |
## end |