[svnbook commit] r2364 - trunk/src/tools
maxb
noreply at red-bean.com
Sat Aug 5 05:37:48 CDT 2006
Author: maxb
Date: Sat Aug 5 05:37:48 2006
New Revision: 2364
Modified:
trunk/src/tools/build-nightlies
Log:
* src/tools/build-nightlies: Include a run of 'make valid' in the nightly
builds, so that invalid XML will cause the nightly build to fail.
Re-work the log code, so that it does not slurp the entire output into
memory, and only then write it into the log file. Instead, attempt to
make it work on a line-by-line basis so that tailing the logfiles is
somewhat possible.
Modified: trunk/src/tools/build-nightlies
==============================================================================
--- trunk/src/tools/build-nightlies (original)
+++ trunk/src/tools/build-nightlies Sat Aug 5 05:37:48 2006
@@ -79,7 +79,7 @@
book_formats.remove('pdf')
# Build
- make_cmd = (['make', 'INSTALL_SUBDIR=__TEMPINSTALL__', 'clean']
+ make_cmd = (['make', 'INSTALL_SUBDIR=__TEMPINSTALL__', 'clean', 'valid']
+ map(lambda x: 'install-%s' % x, book_formats))
if os.path.isdir(temp_dir):
if DRYRUN:
@@ -93,7 +93,11 @@
print "Run: %s" % (cmd)
else:
outerrfp, infp = popen2.popen4(cmd, mode='r')
- open(build_log, 'w').write(outerrfp.read())
+ logfp = open(build_log, 'w', 1)
+ while 1:
+ data = outerrfp.readline()
+ if not data: break
+ logfp.write(data)
finally:
os.chdir(cwd)
More information about the svnbook-dev
mailing list