Boost logo

Boost-Commit :

From: dave_at_[hidden]
Date: 2007-11-15 20:09:07


Author: dave
Date: 2007-11-15 20:09:06 EST (Thu, 15 Nov 2007)
New Revision: 41130
URL: http://svn.boost.org/trac/boost/changeset/41130

Log:
Add clean_log option so we don't need to do a nonportable-to-windows
'rm' command in the recipe.

Make sure results directory exists whenever we start testing.

Text files modified:
   branches/bitten/tools/regression/src/regression.py | 11 ++++++++++-
   1 files changed, 10 insertions(+), 1 deletions(-)

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-15 20:09:06 EST (Thu, 15 Nov 2007)
@@ -75,6 +75,10 @@
             help="if a test fails, exit with a nonzero status",
             action='store_true' )
         
+ opt.add_option( '--clean-log',
+ help="start with a fresh regression log",
+ action='store_true' )
+
         #~ Source Options:
         opt.add_option( '--user',
             help="Boost SVN user ID" )
@@ -114,6 +118,7 @@
             help="do not run bjam; used for testing script changes" )
         
         #~ Defaults
+ self.clean_log = False
         self.runner = None
         self.comment='comment.html'
         self.tag='trunk'
@@ -305,10 +310,14 @@
     
     def command_test_run(self):
         self.import_utils()
- test_cmd = '%s -d2 --dump-tests %s "--build-dir=%s" >>"%s" 2>&1' % (
+
+ utils.makedirs( self.regression_results )
+ redirect = '>' * (2 - self.clean_log);
+ test_cmd = '%s -d2 --dump-tests %s "--build-dir=%s" %s"%s" 2>&1' % (
             self.bjam_cmd( self.toolsets ),
             self.bjam_options,
             self.regression_results,
+ redirect,
             self.regression_log )
         self.log( 'Starting tests (%s)...' % test_cmd )
         cd = os.getcwd()


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