~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Misc/build.sh

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
## does this:
5
5
##   svn up ; ./configure ; make ; make test ; make install ; cd Doc ; make
6
6
##
7
 
## Logs are kept and rsync'ed to the host.  If there are test failure(s),
 
7
## Logs are kept and rsync'ed to the webhost.  If there are test failure(s),
8
8
## information about the failure(s) is mailed.
9
9
##
 
10
## The user must be a member of the webmaster group locally and on webhost.
 
11
##
10
12
## This script is run on the PSF's machine as user neal via crontab.
11
13
##
12
14
## Yes, this script would probably be easier in python, but then
54
56
REMOTE_DIR_DIST="/data/ftp.python.org/pub/python/doc/current"
55
57
RESULT_FILE="$DIR/build/index.html"
56
58
INSTALL_DIR="/tmp/python-test-2.6/local"
57
 
RSYNC_OPTS="-aC -e ssh"
 
59
RSYNC_OPTS="-C -e ssh -rlogD"
58
60
 
59
61
# Always run the installed version of Python.
60
62
PYTHON=$INSTALL_DIR/bin/python
75
77
# test_compiler almost never finishes with the same number of refs
76
78
# since it depends on other modules, skip it.
77
79
# test_logging causes hangs, skip it.
78
 
LEAKY_SKIPS="-x test_compiler test_logging"
 
80
# KBK 21Apr09: test_httpservers causes hangs, skip for now.
 
81
LEAKY_SKIPS="-x test_compiler test_logging test_httpservers"
79
82
 
80
83
# Change this flag to "yes" for old releases to only update/build the docs.
81
84
BUILD_DISABLED="yes"
132
135
 
133
136
## setup
134
137
cd $DIR
 
138
make clobber > /dev/null 2>&1
 
139
cp -p Modules/Setup.dist Modules/Setup
 
140
# But maybe there was no Makefile - we are only building docs. Clear build:
 
141
rm -rf build/
135
142
mkdir -p build
136
 
rm -f $RESULT_FILE build/*.out
137
143
rm -rf $INSTALL_DIR
 
144
## get the path we are building
 
145
repo_path=$(grep "url=" .svn/entries | sed -e s/\\W*url=// -e s/\"//g)
138
146
 
139
147
## create results file
140
148
TITLE="Automated Python Build Results"
152
160
echo "    <td>Hostname:</td><td>`uname -n`</td>" >> $RESULT_FILE
153
161
echo "  </tr><tr>" >> $RESULT_FILE
154
162
echo "    <td>Platform:</td><td>`uname -srmpo`</td>" >> $RESULT_FILE
 
163
echo "  </tr><tr>" >> $RESULT_FILE
 
164
echo "    <td>URL:</td><td>$repo_path</td>" >> $RESULT_FILE
155
165
echo "  </tr>" >> $RESULT_FILE
156
166
echo "</table>" >> $RESULT_FILE
157
167
echo "<ul>" >> $RESULT_FILE
222
232
            start=`current_time`
223
233
            ## ensure that the reflog exists so the grep doesn't fail
224
234
            touch $REFLOG
225
 
            $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network,urlfetch $LEAKY_SKIPS >& build/$F
 
235
            $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network $LEAKY_SKIPS >& build/$F
226
236
            LEAK_PAT="($LEAKY_TESTS|sum=0)"
227
237
            NUM_FAILURES=`egrep -vc "$LEAK_PAT" $REFLOG`
228
238
            place_summary_first build/$F
248
258
cd $DIR/Doc
249
259
F="make-doc.out"
250
260
start=`current_time`
251
 
# XXX(nnorwitz): For now, keep the code that checks for a conflicted file until
252
 
# after the first release of 2.6a1 or 3.0a1.  At that point, it will be clear
253
 
# if there will be a similar problem with the new doc system.
254
 
 
255
 
# Doc/commontex/boilerplate.tex is expected to always have an outstanding
256
 
# modification for the date.  When a release is cut, a conflict occurs.
257
 
# This allows us to detect this problem and not try to build the docs
258
 
# which will definitely fail with a conflict. 
259
 
#CONFLICTED_FILE=commontex/boilerplate.tex
260
 
#conflict_count=`grep -c "<<<" $CONFLICTED_FILE`
261
 
make clean
262
 
conflict_count=0
263
 
if [ $conflict_count != 0 ]; then
264
 
    echo "Conflict detected in $CONFLICTED_FILE.  Doc build skipped." > ../build/$F
265
 
    err=1
266
 
else
267
 
    make checkout update html >& ../build/$F
268
 
    err=$?
269
 
fi
 
261
make clean > ../build/$F 2>&1
 
262
make checkout html >> ../build/$F 2>&1
 
263
err=$?
270
264
update_status "Making doc" "$F" $start
271
265
if [ $err != 0 ]; then
272
266
    NUM_FAILURES=1
290
284
echo "</html>" >> $RESULT_FILE
291
285
 
292
286
## copy results
 
287
chgrp -R webmaster build/html
 
288
chmod -R g+w build/html
293
289
rsync $RSYNC_OPTS build/html/* $REMOTE_SYSTEM:$REMOTE_DIR
294
290
rsync $RSYNC_OPTS dist/* $REMOTE_SYSTEM:$REMOTE_DIR_DIST
295
291
cd ../build