Boost logo

Boost-Commit :

From: dave_at_[hidden]
Date: 2007-11-12 10:18:51


Author: dave
Date: 2007-11-12 10:18:50 EST (Mon, 12 Nov 2007)
New Revision: 41032
URL: http://svn.boost.org/trac/boost/changeset/41032

Log:
Recipe generation fixes.
Put an assertion in process_jam_log that should help us track down problems.
Log system commands in regression.py.

Text files modified:
   branches/bitten/tools/regression/src/process_jam_log.cpp | 4 ++++
   branches/bitten/tools/regression/src/recipe.py | 25 ++++++++++++++-----------
   branches/bitten/tools/regression/src/regression.py | 20 ++++++++++++++------
   3 files changed, 32 insertions(+), 17 deletions(-)

Modified: branches/bitten/tools/regression/src/process_jam_log.cpp
==============================================================================
--- branches/bitten/tools/regression/src/process_jam_log.cpp (original)
+++ branches/bitten/tools/regression/src/process_jam_log.cpp 2007-11-12 10:18:50 EST (Mon, 12 Nov 2007)
@@ -20,6 +20,9 @@
 #include <ctime>
 #include <cctype> // for tolower
 
+#undef NDEBUG
+#include <cassert>
+
 using std::string;
 namespace xml = boost::tiny_xml;
 namespace fs = boost::filesystem;
@@ -372,6 +375,7 @@
       {
         std::cout << "*****Warning - can't open output file: "
           << pth.string() << "\n";
+ assert( file );
       }
       else xml::write( *m_root, file );
     }

Modified: branches/bitten/tools/regression/src/recipe.py
==============================================================================
--- branches/bitten/tools/regression/src/recipe.py (original)
+++ branches/bitten/tools/regression/src/recipe.py 2007-11-12 10:18:50 EST (Mon, 12 Nov 2007)
@@ -116,12 +116,14 @@
 
 def dump():
     repo = 'https://svn.boost.org/svn/boost/branches/bitten'
- repo = 'file:///usr/local/share/svnroot/boost'
+ # repo = 'file:///usr/local/share/svnroot/boost'
     
     print head % {
         'repo': repo
         } + ''.join([lib % {'libname':l} for l in libraries]) + tail
-
+
+ # <python:exec module="shutil" args="-c 'shutil.copy(&quot;tools_regression/src/run.py&quot;, &quot;.&quot;')" />
+
 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"
@@ -129,28 +131,29 @@
        xmlns:python="http://bitten.cmlenz.net/tools/python"
>
   <step id="get-tool-source" description="Update tools source code to version being tested">
+ <sh:exec executable="rm" args="-f results/bjam.log" />
     <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;')" />
+ url="%(repo)s/tools/regression"
+ revision="HEAD" />
+ <sh:exec executable="cp" args="tools_regression/src/run.py ." />
     <svn:checkout
        dir_="tools_bb"
        url="%(repo)s/tools/build/v2"
- revision="${revision}" />
+ revision="HEAD" />
     <svn:checkout
- dir_="tools_jam"
- url="%(repo)s/tools/build/v2"
- revision="${revision}" />
+ dir_="tools_bjam"
+ url="%(repo)s/tools/jam/src"
+ revision="HEAD" />
   </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" />
+ <python:exec file="run.py" args="--incremental --debug-level=10 --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" />
+ <python:exec file="run.py" args="--incremental --library=%(libname)s --debug-level=10 --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>
 '''

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 10:18:50 EST (Mon, 12 Nov 2007)
@@ -264,7 +264,7 @@
         if os.path.exists( patch_boost_path ):
             self.log( 'Found patch file "%s". Executing it.' % patch_boost_path )
             os.chdir( self.regression_root )
- utils.system( [ patch_boost_path ] )
+ self._system( [ patch_boost_path ] )
         pass
     
     def command_setup(self):
@@ -311,7 +311,7 @@
         else:
             os.chdir( os.path.join( self.boost_root, 'status' ) )
         self.log( '...in (%s).' % os.getcwd() )
- utils.system( [ test_cmd ] )
+ self._system( [ test_cmd ] )
         os.chdir( cd )
 
     def command_test_process(self):
@@ -319,7 +319,7 @@
         self.log( 'Getting test case results out of "%s"...' % self.regression_log )
         cd = os.getcwd()
         os.chdir( os.path.join( self.boost_root, 'status' ) )
- utils.checked_system( [
+ self._checked_system( [
             '"%s" "%s" <"%s"' % (
                 self.tool_path(self.process_jam_log),
                 self.regression_results,
@@ -572,7 +572,7 @@
             self.log( 'Found "%s" source directory "%s"' % ( tool[ 'name' ], tool[ 'source_dir' ] ) )
             build_cmd = tool[ 'build_cmd' ]( toolset, tool['build_args'] )
             self.log( 'Building "%s" (%s)...' % ( tool[ 'name'], build_cmd ) )
- utils.system( [ 'cd "%s"' % tool[ 'source_dir' ], build_cmd ] )
+ self._system( [ 'cd "%s"' % tool[ 'source_dir' ], build_cmd ] )
         else:
             raise 'Could not find "%s" source directory "%s"' % ( tool[ 'name' ], tool[ 'source_dir' ] )
 
@@ -604,7 +604,15 @@
               name_or_spec[ 'name' ]
             , '\n'.join( [ name_or_spec[ 'path' ], build_dir ] )
             ) )
-
+
+ def _system( self, cmds ):
+ self.log('running system commands: %s' % cmds)
+ utils.system( cmds )
+
+ def _checked_system( self, cmds ):
+ self.log('running checked system commands: %s' % cmds)
+ utils.checked_system( cmds )
+
     def bjam_build_cmd( self, *rest ):
         if sys.platform == 'win32':
             cmd = 'build.bat %s' % self.bjam_toolset
@@ -648,7 +656,7 @@
             server_name = self.smtp_login.split( '@' )[-1]
             ( user_name, password ) = string.split( self.smtp_login.split( '@' )[0], ':' )
 
- log( ' Sending mail through "%s"...' % server_name )
+ self.log( ' Sending mail through "%s"...' % server_name )
         smtp_server = smtplib.SMTP( server_name )
         smtp_server.set_debuglevel( self.debug_level )
         if user_name:


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