| author | isatest | 
| Sun, 15 Oct 2006 12:16:20 +0200 | |
| changeset 21040 | 983caf913a4c | 
| parent 21039 | 41d61de086bb | 
| child 21047 | 0cf1800ff7cf | 
| 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  | 
||
| 
16095
 
f6af6b265d20
put global isatest settings in one file, sourced by the other scripts
 
kleing 
parents: 
16043 
diff
changeset
 | 
95  | 
$SSH sunbroy2 "$MAKEALL $HOME/settings/sun-poly $HOME/settings/sun-sml-dev"  | 
| 14032 | 96  | 
# give test some time to copy settings and start  | 
97  | 
sleep 5  | 
|
| 
16095
 
f6af6b265d20
put global isatest settings in one file, sourced by the other scripts
 
kleing 
parents: 
16043 
diff
changeset
 | 
98  | 
$SSH atbroy51 "$MAKEALL $HOME/settings/at-poly $HOME/settings/at-sml-dev"  | 
| 
21039
 
41d61de086bb
add experimental at64 poly-4.9.1 test on atbroy101
 
isatest 
parents: 
20339 
diff
changeset
 | 
99  | 
# no at64 tests for the moment, seems to unstable (crashes machine)  | 
| 20339 | 100  | 
#sleep 5  | 
101  | 
# $SSH atbroy98 "$MAKEALL $HOME/settings/at64-poly"  | 
|
| 14032 | 102  | 
sleep 5  | 
| 
21039
 
41d61de086bb
add experimental at64 poly-4.9.1 test on atbroy101
 
isatest 
parents: 
20339 
diff
changeset
 | 
103  | 
$SSH atbroy101 "$MAKEALL $HOME/settings/at64-poly-e"  | 
| 18889 | 104  | 
sleep 5  | 
| 16618 | 105  | 
$SSH macbroy5 "$MAKEALL $HOME/settings/mac-poly $HOME/settings/mac-sml-dev"  | 
| 21040 | 106  | 
sleep 5  | 
107  | 
$SSH macbroy6 "$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
 | 
108  | 
|
| 
 
f6af6b265d20
put global isatest settings in one file, sourced by the other scripts
 
kleing 
parents: 
16043 
diff
changeset
 | 
109  | 
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
 | 
110  | 
|
| 
 
f6af6b265d20
put global isatest settings in one file, sourced by the other scripts
 
kleing 
parents: 
16043 
diff
changeset
 | 
111  | 
gzip -f $DISTLOG  | 
| 13231 | 112  | 
|
| 13234 | 113  | 
## end  |