| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | ## Script to build and test the latest python from svn. It basically
|
|---|
| 4 | ## does this:
|
|---|
| 5 | ## svn up ; ./configure ; make ; make test ; make install ; cd Doc ; make
|
|---|
| 6 | ##
|
|---|
| 7 | ## Logs are kept and rsync'ed to the host. If there are test failure(s),
|
|---|
| 8 | ## information about the failure(s) is mailed.
|
|---|
| 9 | ##
|
|---|
| 10 | ## This script is run on the PSF's machine as user neal via crontab.
|
|---|
| 11 | ##
|
|---|
| 12 | ## Yes, this script would probably be easier in python, but then
|
|---|
| 13 | ## there's a bootstrap problem. What if Python doesn't build?
|
|---|
| 14 | ##
|
|---|
| 15 | ## This script should be fairly clean Bourne shell, ie not too many
|
|---|
| 16 | ## bash-isms. We should try to keep it portable to other Unixes.
|
|---|
| 17 | ## Even though it will probably only run on Linux. I'm sure there are
|
|---|
| 18 | ## several GNU-isms currently (date +%s and readlink).
|
|---|
| 19 | ##
|
|---|
| 20 | ## Perhaps this script should be broken up into 2 (or more) components.
|
|---|
| 21 | ## Building doc is orthogonal to the rest of the python build/test.
|
|---|
| 22 | ##
|
|---|
| 23 |
|
|---|
| 24 | ## FIXME: we should detect test hangs (eg, if they take more than 45 minutes)
|
|---|
| 25 |
|
|---|
| 26 | ## FIXME: we should run valgrind
|
|---|
| 27 | ## FIXME: we should run code coverage
|
|---|
| 28 |
|
|---|
| 29 | ## Utilities invoked in this script include:
|
|---|
| 30 | ## basename, date, dirname, expr, grep, readlink, uname
|
|---|
| 31 | ## cksum, make, mutt, rsync, svn
|
|---|
| 32 |
|
|---|
| 33 | ## remember where did we started from
|
|---|
| 34 | DIR=`dirname $0`
|
|---|
| 35 | if [ "$DIR" = "" ]; then
|
|---|
| 36 | DIR="."
|
|---|
| 37 | fi
|
|---|
| 38 |
|
|---|
| 39 | ## make directory absolute
|
|---|
| 40 | DIR=`readlink -f $DIR`
|
|---|
| 41 | FULLPATHNAME="$DIR/`basename $0`"
|
|---|
| 42 | ## we want Misc/..
|
|---|
| 43 | DIR=`dirname $DIR`
|
|---|
| 44 |
|
|---|
| 45 | ## Configurable options
|
|---|
| 46 |
|
|---|
| 47 | FAILURE_SUBJECT="Python Regression Test Failures"
|
|---|
| 48 | #FAILURE_MAILTO="[email protected]"
|
|---|
| 49 | FAILURE_MAILTO="[email protected]"
|
|---|
| 50 |
|
|---|
| 51 | REMOTE_SYSTEM="[email protected]"
|
|---|
| 52 | REMOTE_DIR="/data/ftp.python.org/pub/docs.python.org/dev/"
|
|---|
| 53 | RESULT_FILE="$DIR/build/index.html"
|
|---|
| 54 | INSTALL_DIR="/tmp/python-test/local"
|
|---|
| 55 | RSYNC_OPTS="-aC -e ssh"
|
|---|
| 56 |
|
|---|
| 57 | # Always run the installed version of Python.
|
|---|
| 58 | PYTHON=$INSTALL_DIR/bin/python
|
|---|
| 59 |
|
|---|
| 60 | # Python options and regression test program that should always be run.
|
|---|
| 61 | REGRTEST_ARGS="-E -tt $INSTALL_DIR/lib/python2.5/test/regrtest.py"
|
|---|
|
|---|