Boost logo

Boost-Commit :

From: dave_at_[hidden]
Date: 2007-11-12 03:17:03


Author: dave
Date: 2007-11-12 03:17:01 EST (Mon, 12 Nov 2007)
New Revision: 41024
URL: http://svn.boost.org/trac/boost/changeset/41024

Log:
set up for local testing on my machine

Added:
   branches/bitten/tools/regression/src/recipe.py (contents, props changed)
Text files modified:
   branches/bitten/tools/regression/src/collect_and_upload_logs.py | 16 ++++------------
   branches/bitten/tools/regression/src/regression.py | 30 ++++++++++++++++++++----------
   branches/bitten/tools/regression/src/run.py | 2 +-
   3 files changed, 25 insertions(+), 23 deletions(-)

Modified: branches/bitten/tools/regression/src/collect_and_upload_logs.py
==============================================================================
--- branches/bitten/tools/regression/src/collect_and_upload_logs.py (original)
+++ branches/bitten/tools/regression/src/collect_and_upload_logs.py 2007-11-12 03:17:01 EST (Mon, 12 Nov 2007)
@@ -109,7 +109,7 @@
                 if log_xml == "": continue
                 log_dom = xml.dom.minidom.parseString(log_xml)
                 
- log_attrs = dict(log_dom.documentElement.attributes.items())
+ toolset = log_dom.documentElement.getAttribute('toolset')
                 for node in log_dom.documentElement.childNodes:
                     
                     if node.nodeType != xml.dom.Node.ELEMENT_NODE: continue
@@ -134,19 +134,11 @@
                         report.createElement('fixture')
                             ).appendChild(
                                 report.createTextNode(
- 'boost.%s.%s.%s' % (
+ 'boost.%s.%s.%s (%s)' % (
                                       log_attrs['library'],
                                       log_attrs['test-name'],
- node.localName
- )))
-
- test.appendChild(
- report.createElement('fixture')
- ).appendChild(
- report.createTextNode(
- 'boost.%s.%s' % (
- log_attrs['library'],
- log_attrs['test-name']
+ node.localName,
+ toolset
                                     )))
 
                     test.appendChild(

Added: branches/bitten/tools/regression/src/recipe.py
==============================================================================
--- (empty file)
+++ branches/bitten/tools/regression/src/recipe.py 2007-11-12 03:17:01 EST (Mon, 12 Nov 2007)
@@ -0,0 +1,161 @@
+# Copyright David Abrahams 2007. Distributed under the Boost
+# Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+# This was output by "bjam -n --boost-dependency-info"
+dependencies = '''test:
+config:
+algorithm: regex
+regex: thread program_options
+date_time: serialization
+system:
+thread: test
+asio: thread system date_time
+assign: test
+any:
+bimap: serialization
+serialization:
+bind:
+circular_buffer:
+concept_check:
+conversion: test
+disjoint_sets:
+dynamic_bitset:
+filesystem: system
+foreach:
+format: test
+function: test
+functional:
+fusion:
+gil:
+graph: test serialization system filesystem
+io: test
+interprocess: thread
+intrusive: thread
+iostreams: test regex
+iterator:
+lambda: test
+logic:
+math: regex test
+mpl:
+numeric: test
+multi_array: test
+multi_index: serialization
+optional:
+parameter: python
+python:
+program_options:
+property_map:
+ptr_container: test serialization
+random:
+range: test
+signals: test
+smart_ptr:
+spirit: thread
+statechart: test
+static_assert:
+tr1:
+tuple: test
+type_traits:
+typeof:
+utility: test
+variant:
+wave: date_time filesystem system thread program_options
+xpressive: test'''
+
+
+lines = dependencies.split('\n')
+# create alphabetical ordering where possible
+lines.sort()
+
+# Graph representation
+children = {}
+
+for l in lines:
+ dependent, dependencies = tuple(l.split(':'))
+ children[dependent] = dependencies.split(' ')[1:]
+ children[dependent].sort()
+
+
+color = {}
+gray = 'gray'
+black = 'black'
+
+class loop(Exception): pass
+
+libraries = []
+
+# Depth first search for topological sort
+def dfs(start):
+ c = color.get(start)
+ if (c == gray):
+ raise loop, start
+ if (c == black): # visited already
+ return
+
+ # starting a visit
+ color[start] = gray
+
+ # visit all children
+ for child in children[start]:
+ dfs(child)
+
+ # okay, all children visited
+ libraries.append(start)
+
+ # ending a visit
+ color[start]=black
+
+# There's a 1-1 mapping between lines and the nodes they name as dependents. Go
+# through them in alphabetical order
+for l in lines:
+ n = l[:l.find(':')]
+ dfs(n)
+
+import xml.dom.minidom
+
+def dump():
+ repo = 'https://svn.boost.org/svn/boost/branches/bitten'
+ repo = 'file:///usr/local/share/svnroot/boost'
+
+ print head % {
+ 'repo': repo
+ } + ''.join([lib % {'libname':l} for l in libraries]) + tail
+
+head = '''<?xml version="1.0" encoding="UTF-8"?>
+<build xmlns:sh="http://bitten.cmlenz.net/tools/sh"
+ xmlns:x="http://bitten.cmlenz.net/tools/xml"
+ xmlns:svn="http://bitten.cmlenz.net/tools/svn"
+ xmlns:python="http://bitten.cmlenz.net/tools/python"
+>
+ <step id="get-tool-source" description="Update tools source code to version being tested">
+ <svn:checkout
+ dir_="tools_regression"
+ url="%(repo)s/tools_regression"
+ revision="${revision}" />
+ <python:exec args="-c 'import shutil;shutil.copy(&quot;tools_regression/src/run.py&quot;, &quot;.&quot;')" />
+ <svn:checkout
+ dir_="tools_bb"
+ url="%(repo)s/tools/build/v2"
+ revision="${revision}" />
+ <svn:checkout
+ dir_="tools_jam"
+ url="%(repo)s/tools/build/v2"
+ revision="${revision}" />
+ </step>
+
+ <step id="build tools" description="Build regression testing tools">
+ <python:exec file="run.py" args="--incremental --bjam-options=-j${boost.parallelism} ${boost.tool-build-options} setup" />
+ </step>
+ '''
+lib ='''
+ <step id="%(libname)s" description="Tests for %(libname)s">
+ <python:exec file="run.py" args="--incremental --library=%(libname)s --bjam-options=-j${boost.parallelism} ${boost.lib-build-options} --bitten-report=results/%(libname)s.xml setup test-run test-process create-bitten-report" />
+ <report category="test" file="results/%(libname)s.xml" />
+ </step>
+'''
+tail ='''
+</build>
+'''
+
+dump()

Modified: branches/bitten/tools/regression/src/regression.py
==============================================================================
--- branches/bitten/tools/regression/src/regression.py (original)
+++ branches/bitten/tools/regression/src/regression.py 2007-11-12 03:17:01 EST (Mon, 12 Nov 2007)
@@ -74,6 +74,8 @@
         #~ Source Options:
         opt.add_option( '--user',
             help="Boost SVN user ID" )
+ opt.add_option( '--revision',
+ help="Boost SVN revision ID", type='int' )
         opt.add_option( '--local',
             help="the name of the boost tarball" )
         opt.add_option( '--force-update',
@@ -207,23 +209,24 @@
             self.rmtree( self.regression_results )
 
     def _get_tool(self, tool_name, dest_dir):
+ repo_key = tool_name.split('/')[0]
         local_path = os.path.join( self.regression_root, 'tools', tool_name )
         if os.path.exists( local_path ):
             import shutil
             shutil.rmtree( dest_dir, ignore_errors=True )
             shutil.copytree( local_path, dest_dir )
         elif self.user and self.user != '':
- os.chdir( os.path.dirname(self.tools_bb_root) )
+ os.chdir( os.path.dirname(dest_dir) )
             self.svn_command( 'co %s %s' % (
- self.svn_repository_url(repo_path['build']),
- os.path.basename(self.tools_bb_root) ) )
+ self.svn_repository_url(repo_path[repo_key]),
+ os.path.basename(dest_dir) ) )
         else:
             self.retry( lambda: self.download_tarball(
- os.path.basename(self.tools_bb_root)+".tar.bz2",
- self.tarball_url(repo_path['build']) ) )
+ os.path.basename(dest_dir)+".tar.bz2",
+ self.tarball_url(repo_path[repo_key]) ) )
             self.unpack_tarball(
- self.tools_bb_root+".tar.bz2",
- os.path.basename(self.tools_bb_root) )
+ dest_dir+".tar.bz2",
+ os.path.basename(dest_dir) )
             
     def command_get_tools(self):
         self.log( 'Getting Boost.Build v2...' )
@@ -426,9 +429,9 @@
                 if not self.incremental: self.command_cleanup( [ 'bin' ] )
                 
             else:
- if self.incremental or self.force_update:
- if not self.incremental: self.command_cleanup( [ 'bin' ] )
- else:
+ if self.force_update:
+ self.command_cleanup( [ 'bin' ] )
+ elif not self.incremental:
                     self.command_cleanup()
                 self.command_get_source()
 
@@ -607,6 +610,10 @@
             cmd = 'build.bat %s' % self.bjam_toolset
         else:
             cmd = './build.sh %s' % self.bjam_toolset
+
+ if self.incremental: # Don't force a rebuild of bjam
+ cmd += ' --update'
+
         env_setup_key = 'BJAM_ENVIRONMENT_SETUP'
         if os.environ.has_key( env_setup_key ):
             return '%s & %s' % ( os.environ[env_setup_key], cmd )
@@ -669,6 +676,9 @@
         else:
             cmd = svn_command_line % { 'user': self.user, 'command': command }
 
+ if self.revision:
+ cmd += ' -r%s' % self.revision
+
         self.log( 'Executing SVN command "%s"' % cmd )
         rc = os.system( cmd )
         if rc != 0:

Modified: branches/bitten/tools/regression/src/run.py
==============================================================================
--- branches/bitten/tools/regression/src/run.py (original)
+++ branches/bitten/tools/regression/src/run.py 2007-11-12 03:17:01 EST (Mon, 12 Nov 2007)
@@ -18,7 +18,7 @@
 
 script_sources = [ 'collect_and_upload_logs.py', 'regression.py' ]
 script_local = os.path.join(root,'tools','regression','src')
-script_remote = 'http://svn.boost.org/svn/boost/trunk/tools/regression/src'
+script_remote = 'http://svn.boost.org/svn/boost/branches/bitten/tools/regression/src'
 script_dir = os.path.join(root,'tools_regression_src')
 
 #~ Bootstrap.


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