Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2008-06-26 19:44:34


Author: troy
Date: 2008-06-26 19:44:34 EDT (Thu, 26 Jun 2008)
New Revision: 46754
URL: http://svn.boost.org/trac/boost/changeset/46754

Log:

Hide build slave variables when BOOST_BUILD_SLAVE is off.

Add prototype slave runner script.

Added:
   branches/CMake/release/tools/build/CMake/run_continuous_slave.py.in (contents, props changed)
Text files modified:
   branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake | 31 ++++++++++++++++++++-----------
   1 files changed, 20 insertions(+), 11 deletions(-)

Modified: branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake
==============================================================================
--- branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake (original)
+++ branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake 2008-06-26 19:44:34 EDT (Thu, 26 Jun 2008)
@@ -9,22 +9,25 @@
 ##########################################################################
 option(BOOST_BUILD_SLAVE "Be a build slave, report build/testing" OFF)
 
-set(BOOST_BUILD_SLAVE_SUBMIT_URL "http://boost:boost@boost.resophonic.com/trac/login/xmlrpc"
- CACHE STRING "URL to post regression testing results to.")
+if(BOOST_BUILD_SLAVE)
+ set(BOOST_BUILD_SLAVE_SUBMIT_URL "http://boost:boost@boost.resophonic.com/trac/login/xmlrpc"
+ CACHE STRING "URL to post regression testing results to.")
 
-file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}" BOOST_BUILD_SLAVE_PYTHONPATH)
+ file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}" BOOST_BUILD_SLAVE_PYTHONPATH)
 
-set(BOOST_BUILD_SLAVE_TIMEOUT 300
- CACHE STRING "Seconds until build slave times out any individual build step")
+ set(BOOST_BUILD_SLAVE_TIMEOUT 300
+ CACHE STRING "Seconds until build slave times out any individual build step")
 
-set(BOOST_BUILD_SLAVE_DETAILS_FILE "slave-description.txt"
- CACHE FILEPATH "Path to file, absolute or relative to build directory, containing descriptive text about the build (configuration peculiarities, etc) to be reported to the server")
+ set(BOOST_BUILD_SLAVE_DETAILS_FILE "slave-description.txt"
+ CACHE FILEPATH "Path to file, absolute or relative to build directory, containing descriptive text about the build (configuration peculiarities, etc) to be reported to the server")
 
-set(BOOST_BUILD_SLAVE_CONTACT_INFO "buildmeister_at_[hidden]"
- CACHE STRING "Contact information regarding this build")
+ set(BOOST_BUILD_SLAVE_CONTACT_INFO "buildmeister_at_[hidden]"
+ CACHE STRING "Contact information regarding this build")
 
-set(BOOST_BUILD_SLAVE_HOSTNAME ""
- CACHE STRING "If set, don't report what python determines to be the FQDN of this host, report this string instead.")
+ set(BOOST_BUILD_SLAVE_HOSTNAME ""
+ CACHE STRING "If set, don't report what python determines to be the FQDN of this host, report this string instead.")
+
+endif(BOOST_BUILD_SLAVE)
 
 message(STATUS "Configuring test/compile drivers")
   
@@ -66,6 +69,12 @@
 #
 if(BOOST_BUILD_SLAVE)
   file(TO_NATIVE_PATH ${BOOST_BUILD_SLAVE_PYTHONPATH}/marshal.py BOOST_TEST_DRIVER)
+
+ configure_file(tools/build/CMake/run_continuous_slave.py.in
+ ${CMAKE_BINARY_DIR}/run_continuous_slave.py
+ @ONLY
+ )
+
 else(BOOST_BUILD_SLAVE)
   file(TO_NATIVE_PATH ${BOOST_BUILD_SLAVE_PYTHONPATH}/passthru.py BOOST_TEST_DRIVER)
 endif(BOOST_BUILD_SLAVE)

Added: branches/CMake/release/tools/build/CMake/run_continuous_slave.py.in
==============================================================================
--- (empty file)
+++ branches/CMake/release/tools/build/CMake/run_continuous_slave.py.in 2008-06-26 19:44:34 EDT (Thu, 26 Jun 2008)
@@ -0,0 +1,34 @@
+#!/usr/bin/python
+#
+# Build slave script.
+#
+
+import pysvn
+
+client = pysvn.Client()
+
+wc_path = r'@CMAKE_SOURCE_DIR@'
+
+while True:
+ svn_entry = client.info(wc_path)
+
+ print "Wc has url %s rev %d.\nChecking for updates." % (svn_entry.url, svn_entry.revision.number)
+
+ ds = client.diff_summarize(url_or_path1=svn_entry.url,
+ revision1=pysvn.Revision(pysvn.opt_revision_kind.number, svn_entry.revision.number),
+ url_or_path2=svn_entry.url,
+ revision2=pysvn.Revision(pysvn.opt_revision_kind.head)
+ )
+
+ if len(ds):
+ print "There are %d changesets. Updating." % len(ds)
+ client.update(wc_path)
+ if os.name == 'nt':
+ os.system('nmake /I slave-start test slave-finish')
+ else:
+ os.system('make -i slave-start test slave-finish')
+ else:
+ time.sleep(5)
+
+
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk