Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2008-05-05 12:46:18


Author: grafik
Date: 2008-05-05 12:46:17 EDT (Mon, 05 May 2008)
New Revision: 45147
URL: http://svn.boost.org/trac/boost/changeset/45147

Log:
Remove use of conditional expressions as they are not supported in Python 2.3.
Text files modified:
   trunk/tools/regression/src/process_jam_log.py | 27 +++++++++++++++++++++------
   1 files changed, 21 insertions(+), 6 deletions(-)

Modified: trunk/tools/regression/src/process_jam_log.py
==============================================================================
--- trunk/tools/regression/src/process_jam_log.py (original)
+++ trunk/tools/regression/src/process_jam_log.py 2008-05-05 12:46:17 EDT (Mon, 05 May 2008)
@@ -40,6 +40,10 @@
         self.revision=None
         self.input = []
         ( _opt_, self.input ) = opt.parse_args(args,self)
+ if self.incremental:
+ run_type = 'incremental'
+ else:
+ run_type = 'full'
         self.results = xml.dom.minidom.parseString('''<?xml version="1.0" encoding="UTF-8"?>
 <test-run
   source="%(source)s"
@@ -55,7 +59,7 @@
             'runner' : self.runner,
             'platform' : self.platform,
             'tag' : self.tag,
- 'run-type' : 'incremental' if self.incremental else 'full',
+ 'run-type' : run_type,
             'revision' : self.revision,
             } )
         
@@ -233,11 +237,15 @@
                             action_tag = 'run'
                     #~ The result sub-part we will add this result to.
                     result_node = self.get_child(log,tag=action_tag)
+ if action_node.getAttribute('status') == '0':
+ action_result = 'succeed'
+ else:
+ action_result = 'fail'
                     if not result_node:
                         #~ If we don't have one already, create it and add the result.
                         result_node = self.new_text(action_tag,result_data,
- result='succeed' if action_node.getAttribute('status') == '0' else 'fail',
- timestamp=action_node.getAttribute('start'))
+ result = action_result,
+ timestamp = action_node.getAttribute('start'))
                         log.appendChild(self.results.createTextNode("\n"))
                         log.appendChild(result_node)
                     else:
@@ -249,7 +257,7 @@
                             if action_node.getAttribute('status') != '0':
                                 result = 'fail'
                         else:
- result = 'succeed' if action_node.getAttribute('status') == '0' else 'fail'
+ result = action_result
                         result_node.setAttribute('result',result)
                         result_node.appendChild(self.results.createTextNode("\n"))
                         result_node.appendChild(self.results.createTextNode(result_data))
@@ -322,6 +330,10 @@
         target_directory = re.sub(r'.*[/\\]bin[.]v2[/\\]','',target_directory)
         target_directory = re.sub(r'[\\]','/',target_directory)
         if not target_directory in self.log:
+ if 'info' in test and test['info'] == 'always_show_run_output':
+ show_run_output = 'true'
+ else:
+ show_run_output = 'false'
             self.log[target_directory] = self.new_node('test-log',
                 library=test['library'],
                 test_name=test['test-name'],
@@ -329,7 +341,7 @@
                 test_program=test['test-program'],
                 toolset=self.get_toolset(node),
                 target_directory=target_directory,
- show_run_output='true' if 'info' in test and test['info'] == 'always_show_run_output' else 'false')
+ show_run_output=show_run_output)
         return self.log[target_directory]
     
     #~ The precise toolset from the build properties.
@@ -373,7 +385,10 @@
             if not data:
                 data = self.get_child(node,tag='#cdata-section')
             if data:
- data = data.data if not strip else data.data.strip()
+ if not strip:
+ data = data.data
+ else:
+ data = data.data.strip()
         if not data:
             data = default
         return data


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