Debian Codegraph @

bin/autotest

raw
1 # This script automatically downloads, installs and checks a
2 # Blitz++ release. It is used to automatically verify a
3 # development release on many platforms before a general
4 # release is made.
5
6 INSTALL_PATH=/tmp
7 COMPILER=egcs
8 FTP_SERVER=monet.uwaterloo.ca
9 FTP_DIR=pub/blitz/snapshots
10 TMPDIR=/tmp
11 TEST_COMMAND="cd $INSTALL_PATH/blitz-$1; echo \"Test results for $1 on \`hostname\` \(\`./config.guess\`\):\"; nice make check; cd examples; nice make examples; cd $INSTALL_PATH; rm -rf $INSTALL_PATH/blitz-$1"
12 FILENAME=blitz-$1.tar.gz
13
14 # Time at which the build and check should occur.
15 # On a heavily used system, specify sometime during the night, e.g. "3 am"
16 # Otherwise you can just say "now"
17 RUNTIME="now"
18
19 # If the test and build will be done on another machine, put
20 # "rsh machinename" here. Otherwise, leave blank.
21 # NB: The directory $INSTALL_PATH must be shared between
22 # the two machines.
23 REMOTE_INVOKE=
24
25 echo `hostname`: Downloading Blitz++ release: blitz-$1.tar.gz
26 echo Will be installed at $INSTALL_PATH/blitz-$1
27
28 FTPSCRIPT=$TMPDIR/blitzftp
29
30 if test -f $INSTALL_PATH/$FILENAME || test -d $INSTALL_PATH/blitz-$1; then
31 echo $INSTALL_PATH/$FILENAME already exists, skipping download
32 else
33 rm -f $FTPSCRIPT
34 echo debug >>$FTPSCRIPT
35 echo open $FTP_SERVER >>$FTPSCRIPT
36 echo user ftp [email protected] >>$FTPSCRIPT
37 echo cd $FTP_DIR >>$FTPSCRIPT
38 echo binary >>$FTPSCRIPT
39 echo get $FILENAME $INSTALL_PATH/$FILENAME >>$FTPSCRIPT
40 echo quit >>$FTPSCRIPT
41 ftp -v -n <$FTPSCRIPT
42 rm -f $FTPSCRIPT
43 fi
44
45 # Now we have hopefully downloaded the file
46
47 if test -d $INSTALL_PATH/blitz-$1; then
48 echo Version has already been unpacked and \(hopefully\) configured.
49 else
50 if test -f $INSTALL_PATH/$FILENAME; then
51 rm -f $FTPSCRIPT
52 cd $INSTALL_PATH
53 gunzip $FILENAME
54 tar xvf blitz-$1.tar
55 rm blitz-$1.tar
56 cd blitz-$1
57 ./configure --with-cxx=$COMPILER
58 nice make lib
59 else
60 echo Error occurred during download of ftp://$FTP_SERVER/$FTP_DIR/$FILENAME
61 exit 1
62 fi
63 fi
64
65 echo "$TEST_COMMAND" | $REMOTE_INVOKE at $RUNTIME
66 echo Build and check of $FILENAME will be done at $RUNTIME.
67